[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] 'svn commit' of out-of-date items

From: Stephen Butler <sbutler_at_elego.de>
Date: Mon, 28 Jan 2008 16:00:45 +0100

Hi folks,

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.

Case 1.
Scheduled for deletion locally, modified in the repo.
Error: File 'foo' is out of date

Case 2.
Modified locally, deleted in the repo.
Error: File not found: transaction '2-3', path 'foo'

Case 3.
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.

Regards,
Steve

[[[
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.

* subversion/libsvn_repos/commit.c
   (delete_entry, open_file, change_dir_prop): Call out_of_date() to
    raise an error if the node is not found in the repo.

* subversion/tests/cmdline/commit_tests.py
   (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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org

Received on 2008-01-28 16:01:00 CET

This is an archived mail posted to the Subversion Dev mailing list.