Pushing branch to SVN re-adds previously deleted tags

Bug #925952 reported by Krzysztof Nowicki
This bug report is a duplicate of:  Bug #609197: bzr tags aren't versioned. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar Subversion Plugin
New
Undecided
Unassigned

Bug Description

I have a BZR branch that was branched off an SVN branch. The moment it was branched from the main repository several tags were present in the /tags directory. Some revisions later one of the tags was removed by calling svn rm tags/tagname. Next time I pushed a change from my BZR branch back to the SVN repository Bazaar incorrectly re-created the tag that was deleted.

I have reproduced this using a clean repository. This is the scenario:

$ svnadmin create /tmp/svntest-repo
$ mkdir /tmp/svntest
$ mkdir /tmp/svntest/{trunk,tags,branches}
$ cd /tmp/svntest/
$ svn import -m "Initial repo population" . file:///tmp/svntest-repo/
$ rm -Rf *
$ svn co file:///tmp/svntest-repo/ .
$ echo "Hello world" > trunk/test1.txt
$ svn add trunk/test1.txt
$ svn commit -m "Add test file"
$ svn copy -m "Test tag" file:///tmp/svntest-repo/trunk file:///tmp/svntest-repo/tags/tag1
$ cd ..
$ bzr branch file:///tmp/svntest-repo/trunk svntest-bzr
$ cd svntest-bzr
$ svn rm -m "Remove tag" file:///tmp/svntest-repo/tags/test1
$ bzr pull
Using saved parent location: /tmp/svntest-repo/trunk/
No revisions to pull.
$ echo "Hello world 2" > test2.txt
$ bzr add test2.txt
$ bzr commit -m "Add test2 file"
$ bzr push file:///tmp/svntest-repo/trunk
$ svn log -v file:///tmp/svntest-repo/
------------------------------------------------------------------------
r6 | krzysn | 2012-02-03 10:43:04 +0100 (Fri, 03 Feb 2012) | 1 line
Changed paths:
   A /tags/tag1 (from /trunk:2)

Add tag tag1
------------------------------------------------------------------------
r5 | krzysn | 2012-02-03 10:43:04 +0100 (Fri, 03 Feb 2012) | 1 line
Changed paths:
   M /trunk
   A /trunk/test2.txt

Add test2 file
------------------------------------------------------------------------
r4 | krzysn | 2012-02-03 10:42:03 +0100 (Fri, 03 Feb 2012) | 1 line
Changed paths:
   D /tags/tag1

Remove tag
------------------------------------------------------------------------
r3 | krzysn | 2012-02-03 10:39:36 +0100 (Fri, 03 Feb 2012) | 1 line
Changed paths:
   A /tags/tag1 (from /trunk:2)

Test tag
------------------------------------------------------------------------
r2 | krzysn | 2012-02-03 10:34:17 +0100 (Fri, 03 Feb 2012) | 1 line
Changed paths:
   A /trunk/test1.txt

Add test file
------------------------------------------------------------------------
r1 | krzysn | 2012-02-03 10:32:53 +0100 (Fri, 03 Feb 2012) | 1 line
Changed paths:
   A /branches
   A /tags
   A /trunk

Initial repo population
------------------------------------------------------------------------

SVN revision 6 re-adds the previously created tag. I thing bzr-svn should also track removal of tags in the SVN repository.

Revision history for this message
Krzysztof Nowicki (krissn) wrote :

Workaround for this is to remove the tag manually using 'bzr tag --delete' before pushing.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

This happens because bzr doesn't version tags and so bzr-svn doesn't know what has happened to tags locally. I'll mark this as a dupe of bug 609197, which is about bzr versioning tags.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.