A user has noticed that the handling of out-of-date conditions in
'svn commit' is inconsistent. For a single file, Subversion 1.4
and 1.5 behave as follows.
Scheduled for deletion locally, modified in the repo.
Error: File 'foo' is out of date
Modified locally, deleted in the repo.
Error: File not found: transaction '2-3', path 'foo'
Scheduled for deletion locally, already deleted in the repo.
No error, commit succeeds.
The same applies to a directory with property modifications.
Subversion issue #1017 led to a new commit test
commit_out_of_date_deletions(), which covers case 1 above. The
following diff ensures that the out-of-date error is raised for
cases 2 and 3, and extends the test to cover those cases.
This came up while investigating tree conflicts. We need to
"tighten the net" at commit time to give future tree-conflict
resolution a chance to work during update, switch or merge.
Since it's unlikely that anyone depends on the current
inconsistency, I suggest we fix it now.
Make 'svn commit' safe for (future) tree conflict resolution.
The commit of a file or dir should stop with an out-of-date error if
the file or dir has been deleted in the repo since the last update.
(delete_entry, open_file, change_dir_prop): Call out_of_date() to
raise an error if the node is not found in the repo.
(commit_out_of_date_deletions): Extend test to include file and dir
deleted in the working copy and deleted in the repo, and file and
dir modified in the working copy and deleted in the repo.
Stephen Butler | Software Developer
elego Software Solutions GmbH
Gustav-Meyer-Allee 25 | 13355 Berlin | Germany
fon: +49 30 2345 8696 | mobile: +49 163 25 45 015
fax: +49 30 2345 8695 | http://www.elegosoft.com
Geschäftsführer: Olaf Wagner | Sitz der Gesellschaft: Berlin
Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194
Received on 2008-01-28 16:01:00 CET
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org