subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Sperling <>
Subject Re: Strange behavior on directory delete/commit
Date Wed, 03 Aug 2011 10:37:24 GMT
On Wed, Aug 03, 2011 at 11:27:48AM +0200, Dominik Psenner wrote:
> > You must still use svn commands instead of OS
> >commands in 1.7. That won't change. I don't think it will ever change.
> >The reason is that Subversion tracks operations explicitly, rather than
> >implicitly. In other words, Subversion needs to modify meta-data in
> >the .svn directory if you change something. If you run an OS-level
> >command the actual disk state and the meta-data get out of sync.
> *sarcastic* The user does not care what levers subversion needs to pull to
> show him what parts of a file were modified. */sarcastic*

File modifications are detected automatically. This is easy because
files have timestamps, and because Subversion has a pristine copy
of each file in the .svn directory. And there is no ambiguity -- a file
is either modified or it isn't.

But for tree changes, Subversion provides commands, and users must
use the commands to operate on the tree.

> The current working copy layout is unable to handle the usecase I described
> since it needs the missing meta-data that was stored within the deleted
> folder itself.

Yes, this is one use case that 1.7 fixes. You can now replace
directories without having to commit the deletion of the replaced
directory separately from the addition of the replacing directory.

E.g. you can delete a directory and move a different one on top:

$ svn rm epsilon                                        
D         epsilon
D         epsilon/zeta
$ svn mv gamma epsilon                                  
A         epsilon
D         gamma
D         gamma/delta
$ svn status
D       gamma
D       gamma/delta
R  +    epsilon
D       epsilon/zeta

and commit the result in a single revision:

r3 | stsp | 2011-08-03 12:27:38 +0200 (Wed, 03 Aug 2011) | 1 line
Changed paths:
   R /trunk/epsilon (from /trunk/gamma:2)
   D /trunk/gamma

1.6 used to error out in the second step:
svn: Cannot copy to 'epsilon' as it is scheduled for deletion

View raw message