You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Ben Collins-Sussman <su...@red-bean.com> on 2006/01/31 02:23:45 UTC

bug: trying to schedule-replace a directory (was Re: new bug?)

On 1/30/06, Julian Foad <ju...@btopenworld.com> wrote:
> Please change the Subject!
>

OK, subject changed, and repro recipe included directly now:


[sussman@sussman-mac:~/scratch]$ svn co file://`pwd`/myrepos wc
A    wc/TODO
A    wc/main.c
A    wc/libsvn_delta
A    wc/libsvn_delta/compose_delta.c
A    wc/libsvn_delta/delta.h
A    wc/libsvn_delta/svndiff.c
A    wc/libsvn_delta/vdelta.c
A    wc/libsvn_delta/xml_output.c
A    wc/libsvn_delta/xdelta.c
A    wc/libsvn_delta/cancel.c
A    wc/libsvn_delta/version.c
A    wc/libsvn_delta/README.xmlparse
A    wc/libsvn_delta/path_driver.c
A    wc/libsvn_delta/default_editor.c
A    wc/libsvn_delta/xml_parse.c
A    wc/libsvn_delta/text_delta.c
A    wc/build.sh
A    wc/build-test-wc.sh
A    wc/Makefile
Checked out revision 1.
[sussman@sussman-mac:~/scratch]$ cd wc
[sussman@sussman-mac:~/scratch/wc]$ ls
Makefile          build-test-wc.sh* libsvn_delta/
TODO              build.sh*         main.c
[sussman@sussman-mac:~/scratch/wc]$ svn rm libsvn_delta/
D         libsvn_delta/compose_delta.c
D         libsvn_delta/delta.h
D         libsvn_delta/svndiff.c
D         libsvn_delta/vdelta.c
D         libsvn_delta/xml_output.c
D         libsvn_delta/xdelta.c
D         libsvn_delta/cancel.c
D         libsvn_delta/version.c
D         libsvn_delta/README.xmlparse
D         libsvn_delta/path_driver.c
D         libsvn_delta/default_editor.c
D         libsvn_delta/xml_parse.c
D         libsvn_delta/text_delta.c
D         libsvn_delta
[sussman@sussman-mac:~/scratch/wc]$ ls
Makefile          build-test-wc.sh* libsvn_delta/
TODO              build.sh*         main.c
[sussman@sussman-mac:~/scratch/wc]$ rm -rf libsvn_delta/
[sussman@sussman-mac:~/scratch/wc]$ ls
Makefile          build-test-wc.sh* main.c
TODO              build.sh*
[sussman@sussman-mac:~/scratch/wc]$ mkdir libsvn_delta
[sussman@sussman-mac:~/scratch/wc]$ svn add libsvn_delta
A         libsvn_delta
subversion/libsvn_wc/lock.c:835: (apr_err=155005)
svn: Unable to lock 'libsvn_delta'
[sussman@sussman-mac:~/scratch/wc]$ svn st
R      .
[sussman@sussman-mac:~/scratch/wc]$ ### what the???


Notice: I tried to replace libsvn_delta with a new directory by the
same name.  Instead, I got a lock error and the *parent* directory is
now listed as schedule-replace!

This is not a new svn 1.4 thing;  it also happens with a 1.2.3 client.

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


Re: bug: trying to schedule-replace a directory

Posted by Julian Foad <ju...@btopenworld.com>.
Ben Collins-Sussman wrote:
> 
> [sussman@sussman-mac:~/scratch/wc]$ svn rm libsvn_delta/
> [sussman@sussman-mac:~/scratch/wc]$ rm -rf libsvn_delta/
> [sussman@sussman-mac:~/scratch/wc]$ mkdir libsvn_delta
> [sussman@sussman-mac:~/scratch/wc]$ svn add libsvn_delta
> A         libsvn_delta
> subversion/libsvn_wc/lock.c:835: (apr_err=155005)
> svn: Unable to lock 'libsvn_delta'
> [sussman@sussman-mac:~/scratch/wc]$ svn st
> R      .
> [sussman@sussman-mac:~/scratch/wc]$ ### what the???

OK, obviously there's a bug there.

I thought, on asking Subversion to delete a directory, (a) the directory tree 
and .svn directories were left in place so that (b) the delete can be reverted 
and (c) "commit" can check whether the contents and refuse to delete anything 
that was of date.

 From a quick test, it seems:

(a) is true
(b) is true
(c) is false - if I delete the remnants from disk, I can still commit the delete.

Is that expected?

- Julian

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

Re: bug: trying to schedule-replace a directory (was Re: new bug?)

Posted by Ben Collins-Sussman <su...@red-bean.com>.
On 1/30/06, Lares Moreau <la...@gmail.com> wrote:

> IIRC, #svn ci is needed here

I'm sure that 'svn commit' will avoid the problem.  But the bug is
that one *shouldn't* have to commit.  It should be possible to get a
directory into a 'schedule-replace' state.

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


Re: bug: trying to schedule-replace a directory (was Re: new bug?)

Posted by Lares Moreau <la...@gmail.com>.
On Mon, 2006-01-30 at 20:23 -0600, Ben Collins-Sussman wrote:
> On 1/30/06, Julian Foad <ju...@btopenworld.com> wrote:
> > Please change the Subject!
> >
> 
> OK, subject changed, and repro recipe included directly now:
> 
> 
> [sussman@sussman-mac:~/scratch]$ svn co file://`pwd`/myrepos wc
[cut]
> [sussman@sussman-mac:~/scratch]$ cd wc
> [sussman@sussman-mac:~/scratch/wc]$ ls
> Makefile          build-test-wc.sh* libsvn_delta/
> TODO              build.sh*         main.c
> [sussman@sussman-mac:~/scratch/wc]$ svn rm libsvn_delta/
[cut]
> [sussman@sussman-mac:~/scratch/wc]$ ls
> Makefile          build-test-wc.sh* libsvn_delta/
> TODO              build.sh*         main.c

IIRC, #svn ci is needed here
which makes the following unnecessary
> [sussman@sussman-mac:~/scratch/wc]$ rm -rf libsvn_delta/

then
[sussman@sussman-mac:~/scratch/wc]$ svn mkdir libsvn_delta
> A         libsvn_delta

And this should work.

-Lares

-- 
Lares Moreau <la...@gmail.com>  | LRU: 400755 http://counter.li.org
lares/irc.freenode.net                 |
Gentoo x86 Arch Tester                 |               ::0 Alberta, Canada
Public Key: 0D46BB6E @ subkeys.pgp.net |          Encrypted Mail Preferred
Key fingerprint = 0CA3 E40D F897 7709 3628  C5D4 7D94 483E 0D46 BB6E