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

Moving directory in repository breaks 'undelete' capability

From: John Browne <jkb_at_mmhomeoffice.com>
Date: 2004-05-15 17:44:43 CEST

Ok, I have been having trouble with the "undelete" method that is described
in the documentation, and I'm beginning to thing it may be some sort of bug.
I was attempting to do a "svn copy" to restore a previously deleted
directory to my working copy which, according to the documentation, is
supposed to also mark it for addition, keeping the history intact. I had
been fighting and researching the error for several hours and, on a hunch,
tried it on an earlier revision, and was able to "undelete" or bring back
the directory. The *only* difference between the working revision, and the
non-working revision, is that the directory had been moved to a different
location in the repository using "svn move". So, my question is, if a
directory is moved to a different location in the repository, then deleted,
do you lose the ability to "undelete" it???

The following test describes the problem I'm having a-bit better. I'm using
Apache 2.0 w/htaccess & svn 1.0.2 server on slackware and 1.0.2 client on
both win32 and slackware, same results with both clients. FYI,
"~/svncode/webcode/mm.com" is the top level of my working copy.
-----------------------------

jbrowne@devbox~/svncode/webcode/mm.com$ svn status

jbrowne@devbox~/svncode/webcode/mm.com$ mkdir testdir

jbrowne@devbox~/svncode/webcode/mm.com$ cd testdir

jbrowne@devbox~/svncode/webcode/mm.com/testdir$ echo asdfasdfasdf
>./testfile.txt

jbrowne@devbox~/svncode/webcode/mm.com/testdir$ cd ..

jbrowne@devbox~/svncode/webcode/mm.com$ svn add testdir
A testdir
A testdir/testfile.txt

jbrowne@devbox~/svncode/webcode/mm.com$ svn -m "created testdir" commit
Adding testdir
Adding testdir/testfile.txt
Transmitting file data .
Committed revision 99.

jbrowne@devbox~/svncode/webcode/mm.com$ mkdir testdir2

jbrowne@devbox~/svncode/webcode/mm.com$ svn add testdir2
A testdir2

jbrowne@devbox~/svncode/webcode/mm.com$ svn -m "created testdir2" commit
Adding testdir2

Committed revision 100.

jbrowne@devbox~/svncode/webcode/mm.com$ svn move testdir ./testdir2/testdir
A testdir2/testdir
D testdir/testfile.txt
D testdir

jbrowne@devbox~/svncode/webcode/mm.com$ ls -la
total 36
drwxr-xr-x 7 jbrowne users 4096 May 14 23:24 .
drwxr-xr-x 4 jbrowne users 4096 May 14 23:19 ..
drwxr-xr-x 7 jbrowne users 4096 May 14 23:25 .svn
drwxr-xr-x 3 jbrowne users 4096 May 14 23:20 data
drwxr-xr-x 12 jbrowne users 4096 May 14 23:20 htdocs
-rw-r--r-- 1 jbrowne users 69 May 14 23:20 robots.txt
-rw-r--r-- 1 jbrowne users 866 May 14 23:19 sitemap.txt
drwxr-xr-x 3 jbrowne users 4096 May 14 23:25 testdir
drwxr-xr-x 4 jbrowne users 4096 May 14 23:25 testdir2

jbrowne@devbox~/svncode/webcode/mm.com$ svn -m "moved testdir into testdir2"
commit
Deleting testdir
Adding testdir2/testdir

Committed revision 101.

jbrowne@devbox~/svncode/webcode/mm.com$ ls
. .. .svn data htdocs robots.txt sitemap.txt testdir2

jbrowne@devbox~/svncode/webcode/mm.com$ cd testdir2

jbrowne@devbox~/svncode/webcode/mm.com/testdir2$ ls
. .. .svn testdir

jbrowne@devbox~/svncode/webcode/mm.com/testdir2$ svn delete testdir
D testdir/testfile.txt
D testdir

jbrowne@devbox~/svncode/webcode/mm.com/testdir2$ svn -m "deleted testdir"
commit
Deleting testdir2/testdir

Committed revision 102.

jbrowne@devbox~/svncode/webcode/mm.com/testdir2$ svn -r 101 list
http://devbox.nowhere.com:81/home/svndata/webcode/mm.com/trunk/testdir2/testdir
testfile.txt

jbrowne@devbox~/svncode/webcode/mm.com/testdir2$ svn -r 101 copy
http://devbox.nowhere.com:81/home/svndata/webcode/mm.com/trunk/testdir2/testdir .
svn: Working copy '.' locked
svn: run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)

jbrowne@cvs:~/svncode/webcode/mm.com/testdir2$ ls -la
total 16
drwxr-xr-x 4 jbrowne users 4096 May 14 23:48 .
drwxr-xr-x 6 jbrowne users 4096 May 14 23:25 ..
drwxr-xr-x 7 jbrowne users 4096 May 14 23:48 .svn
drwxr-xr-x 3 jbrowne users 4096 May 14 23:48 testdir

jbrowne@cvs:~/svncode/webcode/mm.com/testdir2$ cd testdir

jbrowne@cvs:~/svncode/webcode/mm.com/testdir2/testdir$ ls -la
total 12
drwxr-xr-x 3 jbrowne users 4096 May 14 23:48 .
drwxr-xr-x 4 jbrowne users 4096 May 14 23:48 ..
drwxr-xr-x 7 jbrowne users 4096 May 14 23:48 .svn

jbrowne@cvs:~/svncode/webcode/mm.com/testdir2/testdir$

-----------------------------------

Notice, that the testdir directory does, in fact, get re-created, but the
testfile.txt file does not. I've tried checking out a clean copy, same
results.

If someone could confirm this behavior so I can submit a bug report, I would
greatly appreciate it. Otherwise, if I'm doing something wrong, someone
please point out my stupid error and I'll be happy.. :)

JKB

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat May 15 17:45:17 2004

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.