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

Redundant 'svn delete' unchallenged

From: Kevin Ballard <kevin_at_sb.org>
Date: 2004-09-29 10:19:38 CEST

I just ran into an easy-to-reproduce situation that creates empty
commits. Basically, you delete a file in one working copy and commit,
then delete the same file in another working copy and commit that
without updating. The commit goes through just fine and the resulting
revision has no modified files. I would have expected it to challenge
the commit for multiple reasons:

1) The files in question didn't exist anymore in the repository

2) The resulting commit was empty

3) The directory itself was out of date

When examining the 'svn log' it shows no modified paths, and it shows
no author and no date. When examining a dump of the repo it shows no
changed nodes, yet it does list an author and a date.

A quick script to reproduce this issue is the following (make sure you
don't already have existing files/dirs named Test, Test2, or TestRepo):

========================================================
#!/bin/sh -x

svnadmin create TestRepo --fs-type fsfs
svn checkout file://${PWD}/TestRepo Test
cd Test
touch foo
svn add foo
svn commit -m 'Initial add'
cd ..
svn checkout file://${PWD}/TestRepo Test2
cd Test2
svn delete foo
svn commit -m 'Delete wc2'
cd ../Test
svn delete foo
svn commit -m 'Delete wc1'
svn update
svn log -v

cd ..
svnadmin dump TestRepo

rm -rf TestRepo Test Test2
========================================================

After running this script, my resulting log is:

========================================================
------------------------------------------------------------------------
r3 | (no author) | (no date) | 1 line

------------------------------------------------------------------------
r2 | kevin | 2004-09-29 04:17:05 -0400 (Wed, 29 Sep 2004) | 1 line
Changed paths:
    D /foo

Delete wc2
------------------------------------------------------------------------
r1 | kevin | 2004-09-29 04:17:03 -0400 (Wed, 29 Sep 2004) | 1 line
Changed paths:
    A /foo

Initial add
------------------------------------------------------------------------
========================================================

And my resulting repo dump is:

========================================================
SVN-fs-dump-format-version: 2

UUID: 0f25ba2f-36e5-0310-9741-f1cced0fab34

Revision-number: 0
Prop-content-length: 56
Content-length: 56

K 8
svn:date
V 27
2004-09-29T08:17:01.855677Z
PROPS-END

* Dumped revision 0.
Revision-number: 1
Prop-content-length: 111
Content-length: 111

K 7
svn:log
V 11
Initial add
K 10
svn:author
V 5
kevin
K 8
svn:date
V 27
2004-09-29T08:17:03.544880Z
PROPS-END

Node-path: foo
Node-kind: file
Node-action: add
Prop-content-length: 10
Text-content-length: 0
Text-content-md5: d41d8cd98f00b204e9800998ecf8427e
Content-length: 10

PROPS-END

* Dumped revision 1.
Revision-number: 2
Prop-content-length: 110
Content-length: 110

K 7
svn:log
V 10
Delete wc2
K 10
svn:author
V 5
kevin
K 8
svn:date
V 27
2004-09-29T08:17:05.492571Z
PROPS-END

Node-path: foo
Node-action: delete

* Dumped revision 2.
Revision-number: 3
Prop-content-length: 110
Content-length: 110

K 7
svn:log
V 10
Delete wc1
K 10
svn:author
V 5
kevin
K 8
svn:date
V 27
2004-09-29T08:17:06.626249Z
PROPS-END

* Dumped revision 3.
========================================================

This issue affects both svn 1.0.x and svn 1.1.x (both fsfs and BDB)

-- 
Kevin Ballard
kevin@sb.org
http://www.tildesoft.com
http://kevin.sb.org

  • application/pkcs7-signature attachment: smime.p7s
Received on Wed Sep 29 10:20:24 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.