Rev 6132: (jelmer) In "bzr tag", in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Tue Sep 6 13:35:14 UTC 2011
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 6132 [merge]
revision-id: pqm at pqm.ubuntu.com-20110906133507-jxpb08khpc90jvvo
parent: pqm at pqm.ubuntu.com-20110906124546-xrbi8u3lk47e9q5t
parent: jelmer at samba.org-20110906100753-qob3dw7dp87byu0s
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2011-09-06 13:35:07 +0000
message:
(jelmer) In "bzr tag",
mention when an existing tag has been updated (with --force). (Jelmer
Vernooij)
modified:
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/tests/blackbox/test_tags.py test_tags.py-20070116132048-5h4qak2cm22jlb9e-1
doc/en/release-notes/bzr-2.5.txt bzr2.5.txt-20110708125756-587p0hpw7oke4h05-1
=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py 2011-09-06 11:01:30 +0000
+++ b/bzrlib/builtins.py 2011-09-06 13:35:07 +0000
@@ -5662,7 +5662,10 @@
note('Tag %s already exists for that revision.' % tag_name)
else:
branch.tags.set_tag(tag_name, revision_id)
- note('Created tag %s.' % tag_name)
+ if existing_target is None:
+ note('Created tag %s.' % tag_name)
+ else:
+ note('Updated tag %s.' % tag_name)
class cmd_tags(Command):
=== modified file 'bzrlib/tests/blackbox/test_tags.py'
--- a/bzrlib/tests/blackbox/test_tags.py 2011-08-31 15:25:11 +0000
+++ b/bzrlib/tests/blackbox/test_tags.py 2011-09-06 10:07:53 +0000
@@ -77,7 +77,8 @@
out, err = self.run_bzr('tag -d branch NEWTAG -r0', retcode=3)
self.assertContainsRe(err, 'Tag NEWTAG already exists\\.')
# ... but can if you use --force
- out, err = self.run_bzr('tag -d branch NEWTAG --force')
+ out, err = self.run_bzr('tag -d branch NEWTAG --force -r0')
+ self.assertEquals("Updated tag NEWTAG.\n", err)
def test_tag_same_revision(self):
t = self.make_branch_and_tree('branch')
=== modified file 'doc/en/release-notes/bzr-2.5.txt'
--- a/doc/en/release-notes/bzr-2.5.txt 2011-09-06 10:11:54 +0000
+++ b/doc/en/release-notes/bzr-2.5.txt 2011-09-06 13:35:07 +0000
@@ -106,7 +106,8 @@
(Jelmer Vernooij, #164450)
* ``bzr tag`` no longer errors if a tag already exists but refers to the
- same revision. (Jelmer Vernooij)
+ same revision, and will mention when a tag has been updated
+ rather than created. (Jelmer Vernooij, #381203)
* ``bzr uncommit`` will now remove tags that refer to removed revisions.
The ``--keep-tags`` option can be used to prevent this behaviour.
More information about the bazaar-commits
mailing list