Rev 2808: In checkouts, tags are copied into the master branch when created, changed or deleted, and are copied into the checkout when it is updated. (Martin Pool, #93856, #93860) in http://sourcefrog.net/bzr/tags
Martin Pool
mbp at sourcefrog.net
Tue Sep 11 04:03:32 BST 2007
At http://sourcefrog.net/bzr/tags
------------------------------------------------------------
revno: 2808
revision-id: mbp at sourcefrog.net-20070911030330-8000a0t8feq8g130
parent: mbp at sourcefrog.net-20070911020916-t0i1xe6jrpmjl4vf
committer: Martin Pool <mbp at sourcefrog.net>
branch nick: tags
timestamp: Tue 2007-09-11 13:03:30 +1000
message:
In checkouts, tags are copied into the master branch when created, changed or deleted, and are copied into the checkout when it is updated. (Martin Pool, #93856, #93860)
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/tests/test_tag.py test_tag.py-20070212110532-91cw79inah2cfozx-2
=== modified file 'NEWS'
--- a/NEWS 2007-09-07 13:33:03 +0000
+++ b/NEWS 2007-09-11 03:03:30 +0000
@@ -12,6 +12,7 @@
* The default branch and repository format has changed to
``dirstate-tags``, so tag commands are active by default.
This format is compatible with Bazaar 0.15 and later.
+ This incidentally fixes bug #126141.
(Martin Pool)
* ``--quiet`` or ``-q`` is no longer a global option. If present, it
@@ -126,6 +127,10 @@
* Prompt for an ftp password if none is provided.
(Vincent Ladeuil, #137044)
+ * In checkouts, tags are copied into the master branch when created,
+ changed or deleted, and are copied into the checkout when it is
+ updated. (Martin Pool, #93856, #93860)
+
IMPROVEMENTS:
* Add the option "--show-diff" to the commit command in order to display
=== modified file 'bzrlib/tests/test_tag.py'
--- a/bzrlib/tests/test_tag.py 2007-09-11 02:09:16 +0000
+++ b/bzrlib/tests/test_tag.py 2007-09-11 03:03:30 +0000
@@ -86,6 +86,7 @@
def test_tag_in_checkout(self):
# checkouts are directly connected to the tags of their master branch:
# adding a tag in the checkout pushes it to the master
+ # https://bugs.launchpad.net/bzr/+bug/93860
master = self.make_branch('master')
child = self.make_branch('child')
child.bind(master)
@@ -97,6 +98,28 @@
master.tags.lookup_tag, 'foo')
def test_update_updates_tags(self):
- raise KnownFailure(
- "TODO: updating the checkout should update the checkout's copy of the\
- tag dictionary")
+ # https://bugs.launchpad.net/bzr/+bug/93856
+ master = self.make_branch('master')
+ master.tags.set_tag('foo', 'rev-1')
+ child = self.make_branch('child')
+ child.bind(master)
+ child.update()
+ # after an update, the child has all the master's tags
+ self.assertEquals('rev-1', child.tags.lookup_tag('foo'))
+ # add another tag and update again
+ master.tags.set_tag('tag2', 'target2')
+ child.update()
+ self.assertEquals('target2', child.tags.lookup_tag('tag2'))
+
+ def test_tag_deletion_from_master_to_bound(self):
+ master = self.make_branch('master')
+ master.tags.set_tag('foo', 'rev-1')
+ child = self.make_branch('child')
+ child.bind(master)
+ child.update()
+ # and deletion of tags should also propagate
+ master.tags.delete_tag('foo')
+ raise KnownFailure("tag deletion does not propagate: "
+ "https://bugs.launchpad.net/bzr/+bug/138802")
+ self.assertRaises(errors.NoSuchTag,
+ child.tags.lookup_tag, 'foo')
More information about the bazaar-commits
mailing list