a common user problem when committing property changes to a directory is that
the directory is out of date and the commit therefore fails. The solution is
to update the directory. So far everything seems to be ok.
But there are corner cases when subversion claims a directory to be
out-of-date when it isn't really. The checks if property change are allowed
to be committed are a bit lazy. They only consider the revision number. But
since the revision number is only a point in time it doesn't mean that a
relevant change has taken place in the directory. A better algorithm is to
check if a property change has taken place between the BASE revision of the
directory which is about to be commited and HEAD. If there are property
changes then the commit of the property change should fail; else succeed.
My original question on the users mailing list with two scenarios can be found
Erik Huelsmann kindly pointed be to the enhancement "be more permissive with
out-of-date dirs": http://subversion.tigris.org/issues/show_bug.cgi?id=1539
Because this missing enhancement is constantly irritating me, I decided to
When running the tests I noticed that
"subversion/tests/clients/cmdline/commit_tests.py 13" fails after having
applied my patches. Obviously so much intelligience was not expected so that
the commit to a property change which was expected to fail with an "out of
date" error actually works now. I changed the test 13, so that it fails for a
better reason than before. Now the property about to be commited has been
changed in the repository in the meantime and the out-of-date is justified.
A further improvement:
Instead of relying on checking if there were any property changes in the
directory between BASE and HEAD it would be even more intelligent to check
for conflicts: if the property/properties about to commited and the
property/properties which were changed between BASE and HEAD all have
*different* names then the commit succeeds; else fails!
This has the effect that the working copy can more easily contains mixed
Since this further enhancement is not yet implemented I added a test which
When committing a property change to a directory the check for "out-of-date"
was rather lazy. It used to only compare the revision numbers of BASE and
HEAD. Now svn_fs_props_changed(...) is called to determine if a property
change has taken place at all. If a property change has taken place then the
directory is "out of date"; else the commit succeeds.
subversion/libsvn_repos/commit.c: implemention for ra_local and ra_svn
subversion/mod_dav_svn/version.c: implemention for ra_dav
subversion/tests/cmdline/commit_tests.py: two new tests for #1539 and a test
which currently XFails.
When the patch is applied I will go on to try to implement this further
enhancement which currently XFails.
All patches are created with the HEAD revision of trunk.
Received on Fri Jan 6 09:19:14 2006
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org