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

Re: bug round 2

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2002-12-02 04:08:15 CET

Michael Price <mprice@atl.lmco.com> writes:

> $ ~/tmp> dir
> $ ~/tmp> svn co http://jail/svn/test
> Checked out revision 0.
> $ ~/tmp> cd test
> $ ~/tmp/test> svn mkdir "dir1"
> A dir1
> $ ~/tmp/test> cd dir1
> $ ~/tmp/test/dir1> svn mkdir dir2
> A dir2
> $ ~/tmp/test/dir1> cd ..
> $ ~/tmp/test> svn commit -m "new dirs"
> Adding dir1
> Adding dir1/dir2
>
> Committed revision 1.
> $ ~/tmp/test> cd dir1
> $ ~/tmp/test/dir1> cd dir2
> $ ~/tmp/test/dir1/dir2> echo "file" > file1
> $ ~/tmp/test/dir1/dir2> svn add file1
> A file1
> $ ~/tmp/test/dir1/dir2> svn commit -m "new file"
> Adding dir2/file1
> Transmitting file data .
> Committed revision 2.
> $ ~/tmp/test/dir1/dir2> echo "new" > file2
> $ ~/tmp/test/dir1/dir2> svn add file2
> A file2
> $ ~/tmp/test/dir1/dir2> svn rm file1
> D file1
> $ ~/tmp/test/dir1/dir2> svn commit -m "delete one add one"
> Deleting dir2/file1
> Adding dir2/file2
> Transmitting file data .
> Committed revision 3.
> $ ~/tmp/test/dir1/dir2> cd ..
> $ ~/tmp/test/dir1> cd ..
> $ ~/tmp/test> svn mkdir newdir
> A newdir
> $ ~/tmp/test> svn commit -m "director"
> Adding newdir
>
> Committed revision 4.
> $ ~/tmp/test> svn mv dir1 newdir
> A newdir/dir1
> D dir1/dir2/file2
> D dir1/dir2
> D dir1
> $ ~/tmp/test> svn commit -m "mv"
> Deleting dir1
> Adding newdir/dir1
> Adding newdir/dir1/dir2/file2
>
> Committed revision 5.

This is a bug. It should fail here with transaction out of date. It
*does* fail over ra_local, but not over ra_dav.

$ cat doit
export REPO=file:///tmp/repo
#export REPO=http://localhost:8888/tmp/repo
rm -rf /tmp/repo wc
svnadmin create /tmp/repo
svn co $REPO wc
svn mkdir wc/dir1
svn mkdir wc/dir1/dir2
svn ci -m "new dirs" wc
echo file1 > wc/dir1/dir2/file1
svn add wc/dir1/dir2/file1
svn ci -m "new file" wc
echo file2 > wc/dir1/dir2/file2
svn add wc/dir1/dir2/file2
svn rm wc/dir1/dir2/file1
svn ci -m "delete one add one" wc
svn mkdir wc/newdir
svn ci -m "director" wc
svn mv wc/dir1 wc/newdir
svn ci -m "mv" wc

Over ra_local I get

...
Committed revision 4.
A wc/newdir/dir1
D wc/dir1/dir2/file2
D wc/dir1/dir2
D wc/dir1
Deleting wc/dir1
svn: Transaction is out of date
svn: Commit failed (details follow):
svn: out of date: `dir1' in txn `5'

as expected, but over ra_dav I get

...
Committed revision 4.
A wc/newdir/dir1
D wc/dir1/dir2/file2
D wc/dir1/dir2
D wc/dir1
Deleting wc/dir1
Adding wc/newdir/dir1
Adding wc/newdir/dir1/dir2/file2

Committed revision 5.

In both cases (ra_dav and ra_local) the working copy before the move
looks like

                0 0 ? wc
                1 1 anonymous wc/dir1
                1 1 anonymous wc/dir1/dir2
                3 3 anonymous wc/dir1/dir2/file2
                4 4 anonymous wc/newdir
Head revision: 4

and after the move but before the commit it looks like

                0 0 ? wc
D 1 1 anonymous wc/dir1
D 1 1 anonymous wc/dir1/dir2
D 3 3 anonymous wc/dir1/dir2/file2
                4 4 anonymous wc/newdir
A + - 1 anonymous wc/newdir/dir1
   + - 1 anonymous wc/newdir/dir1/dir2
   + - 3 anonymous wc/newdir/dir1/dir2/file2

so ra_dav and mod_dav_svn are the likely suspects.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Dec 2 04:09:00 2002

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.