You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by John Browne <jk...@mmhomeoffice.com> on 2004/05/15 15:44:43 UTC

Moving directory in repository breaks 'undelete' capability

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

Re: Moving directory in repository breaks 'undelete' capability

Posted by Josh Pieper <jj...@pobox.com>.
Ben Collins-Sussman wrote:
> On Sat, 2004-05-15 at 10:44, John Browne wrote:
> 
> > 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)
> 
> Congrats, you've discovered issue 1769.  :-)
> 
> It's already scheduled to be fixed in svn 1.1.  For now, just run 'svn
> up' before doing the copy.

Actually I think this is fixed just by revision 9193...  It is pretty
simple, and applies cleanly to the 1.0.x branch so it could be
backported.

-Josh

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Moving directory in repository breaks 'undelete' capability

Posted by Ben Collins-Sussman <su...@collab.net>.
On Sat, 2004-05-15 at 10:44, John Browne wrote:

> 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)

Congrats, you've discovered issue 1769.  :-)

It's already scheduled to be fixed in svn 1.1.  For now, just run 'svn
up' before doing the copy.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org