Urs Thuermann wrote:
> I try to move a directory (and all its subdirectories) to a new
> location in the directory tree of my working copy. But this doesn't
> work as expected:
>
> $ svn co http://.../some-project
> A ...
> ...
> $ cd some-project/...
> $ ls -l
> total 4
> drwxr-xr-x 5 ethuerm ethuerm 4096 Apr 26 15:37 can
> $ svn mkdir net
> A net
> $ svn move can net
> A net/can
> D can/mscan
> D can/vcan.c
> D can/Makefile
> D can/sja1000/sja1000.c
> D can/sja1000/proc.c
> D can/sja1000/sja1000.h
> D can/sja1000/trajet-gw2.c
> D can/sja1000/Makefile
> D can/sja1000/isa.c
> D can/sja1000
> D can
>
> You see the old directory and its contents are deleted, the new
> directory is created but the contents of the new directory are not
> scheduled to be added (although they are in the new new dircetory).
>
> A svn stat show the same output as above and svn diff shows all the
svn st should give you a bit different output (see below).
> files to be deleted but the new ones not created. Also, I am
> surprised that the old directory tree still exists (despite the fact
> that it is empty excpet the .svn directories).
That's normal behavior. Subversion still has the
information that this folder is scheduled for deletion
in the .svn folder.
BTW you should now see all files in folder net/can
which is "a good sign" that this folder will be added
includind subfolders and files ;-)
>
> I haven't tried to check in these changes as I don't want to risk
> damaging the repository.
You normaly can't damage the repository by doing a
commit. If you delete something wrong with a commit
you can always ressurect the old revision.
>
> Am I using svn wrong? I haven't found anything in the FAQ.
You may want to have a look at
http://svn.haxx.se/dev/archive-2006-02/0853.shtml
where I described exactly what you see here.
In short: Subversion just shows one line for the whole
tree. If you say 'svn st' you will see a '+' near the 'A'
which shows that the new folder isn't only added but
copied from another folder. (And if you commit the change
you will see only one line for the deleted folder, too.)
Please be aware that in your example you don't rename
can to net but move can to net/can. If you want to rename
can to net you mustn't create net before doing the move.
Mathias
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Apr 26 16:21:21 2006