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

Cannot commit moved directory after adding (and committing) a child

From: Johan Corveleyn <johan.corveleyn_at_uz.kuleuven.ac.be>
Date: Fri, 28 Aug 2009 17:14:34 +0200

I think I've seen this being discussed before (on the list or in the issue tracker), but can't find it again. So if anyone remembers, or can shed any light on this, I would very much appreciate it.

Following up on "tree changes that cause problems for wc-1 (and that I would like to verify if wc-ng will fix)", as in http://svn.haxx.se/users/archive-2009-08/0630.shtml, I saw some other strange behavior. I'm not sure whether this is a bug or "as designed":

Short description (recipe below):
- Do some "tree action" (e.g. adding a file) in a directory. Commit it.
- Then move the directory. Commit.
- Error:
svn: Commit failed (details follow):
svn: Item '/trunk/test/test_moves/clean3/dir' is out of date

Going further:
- svn up: Tree conflict:
D C dir
> local delete, incoming edit upon update
- svn resolve. Changes are now committed correctly.

I guess the basic explanation is that this is caused by the mixed revision thing (i.e. the directory is a revision number behind, after committing the new file). So it thinks it is out of date, although it obviously isn't (also, "svn st -u" reports nothing, so it too thinks the directory is really up to date). I would consider this a bug.

------------
Now in CLI speak (assuming wc with versioned directory "dir"):
$ echo test > dir/test.txt
$ svn add dir/test.txt
A dir\test.txt

$ svn ci -m"test"
Adding clean3\dir\test.txt
Transmitting file data .
Committed revision 96274.

$ svn info dir
...
Revision: 96273
...
Last Changed Rev: 96273
...

$ svn st -u
Status against revision: 96274

$ svn mv dir dir2
A dir2
D dir\test.txt
D dir

$ svn ci -m"dir move mixed rev"
Deleting clean3\dir
svn: Commit failed (details follow):
svn: Item '/trunk/test/test_moves/clean3/dir' is out of date

$ svn up
   C dir
At revision 96274.
Summary of conflicts:
  Tree conflicts: 1

$ svn st
A + dir2
D C dir
> local delete, incoming edit upon update
D dir\test.txt

$ svn resolve --accept=working dir
Resolved conflicted state of 'dir'

$ svn ci -m"dir move mixed rev"
Deleting clean3\dir
Adding clean3\dir2
Adding clean3\dir2\test.txt

Committed revision 96275.

$ svn log -v dir2/test.txt
------------------------------------------------------------------------
r96275 | xxxxxx | 2009-08-28 16:45:10 +0200 (vr, 28 aug 2009) | 1 line
Changed paths:
   D /trunk/test/test_moves/clean3/dir
   A /trunk/test/test_moves/clean3/dir2 (from /trunk/test/test_moves/clean3/dir:96273)
   A /trunk/test/test_moves/clean3/dir2/test.txt (from /trunk/test/test_moves/clean3/dir/test.txt:96274)

dir move mixed rev
------------------------------------------------------------------------
r96274 | xxxxxx | 2009-08-28 16:42:10 +0200 (vr, 28 aug 2009) | 1 line
Changed paths:
   A /trunk/test/test_moves/clean3/dir/test.txt

test
------------------------------------------------------------------------

Regards,
Johan

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2388307

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-08-28 17:15:34 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.