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

unexpected behaviour (bug?) when moving/copying

From: SteveKing <steveking_at_gmx.ch>
Date: 2004-12-18 14:11:58 CET

Hi,

TSVN users discovered some strange behaviour when creating a tag and
when moving directories around in the working copy. Checking the TSVN
source came up empty, so I spent some time with the command line client
to produce a reproduction recipe. Here it goes:

(note: all this is done inside f:\test, a testing directory I created)

$ svnadmin create testrepo
$ svn mkdir file:///f:/test/testrepo/trunk -m "trunk"
Revision 1
$ svn mkdir file:///f:/test/testrepo/tags -m "tags"
Revision 2
$ svn mkdir file:///f:/test/testrepo/tags/version1 -m "version1"
Revision 3
$ svn copy file:///f:/test/testrepo/trunk \
   file:///f:/test/testrepo/tags/version1 -m "tagging trunk"
Revision 4
$ svn ls -v file:///f:/test/testrepo/tags/version1
     4 kueng Dez 18 14:00 trunk/

As you can see: the copy from /trunk to /tags/version1 created a new
folder /tags/version1/trunk. I would have expected an error message that
the target folder /tags/version1 already exists. It was very unexpected
for the users to find a /trunk folder, even though they never even told
svn to create it.

A similar behaviour exists when moving files around in the working copy:
$ svnadmin create testrepo
$ svn mkdir file:///f:/test/testrepo/trunk -m "trunk"
$ svn co file:///f:/test/testrepo/trunk testwc
$ svn mkdir f:\test\testwc\currentdir
$ svn mkdir f:\test\testwc\currentdir\dir1
$ svn mkdir f:\test\testwc\currentdir\dir2
$ echo > f:\test\testwc\currentdir\dir1\file1
$ svn add f:\test\testwc\currentdir\dir1\file1
$ echo > f:\test\testwc\currentdir\dir2\file2
$ svn add f:\test\testwc\currentdir\dir2\file2
$ svn mkdir f:\test\testwc\targetdir
$ svn mkdir f:\test\testwc\targetdir\dir1
$ echo > f:\test\testwc\targetdir\dir1\fileA
$ svn add f:\test\testwc\targetdir\dir1\fileA
$ svn ci -m "commit" f:\test\testwc
$ svn mv f:\test\testwc\currentdir\dir2 f:\test\testwc\targetdir\dir2
$ svn mv f:\test\testwc\currentdir\dir1 f:\test\testwc\targetdir\dir1

After running this script, you'll end up with the following folder
structure in your working copy:

testwc\currentdir
testwc\targetdir
testwc\targetdir\dir1
testwc\targetdir\dir1\fileA
testwc\targetdir\dir1\dir1
testwc\targetdir\dir1\dir1\file1
testwc\targetdir\dir2
testwc\targetdir\dir2\file2

instead of (what most users expect) either an error message (that
targetdir\dir1 already exists) or the following structure:
testwc\currentdir
testwc\targetdir
testwc\targetdir\dir1
testwc\targetdir\dir1\fileA
testwc\targetdir\dir1\file1
testwc\targetdir\dir2
testwc\targetdir\dir2\file2

All this tested with
svn, Version 1.1.1 (r11581)

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Dec 18 14:13:16 2004

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

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