Rev 2867: Fix log against smart server branches that don't support tags. (James in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Wed Sep 26 00:32:24 BST 2007
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 2867
revision-id: pqm at pqm.ubuntu.com-20070925233221-gwux298mtf2uy53w
parent: pqm at pqm.ubuntu.com-20070925212801-8p7l0qlplb0t7h2u
parent: bialix at ukr.net-20070925221308-aqaqq1u2qv6kpl2z
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2007-09-26 00:32:21 +0100
message:
Fix log against smart server branches that don't support tags. (James
Westby)
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/tag.py tag.py-20070212110532-91cw79inah2cfozx-1
bzrlib/tests/test_tag.py test_tag.py-20070212110532-91cw79inah2cfozx-2
------------------------------------------------------------
revno: 2866.1.1
merged: bialix at ukr.net-20070925221308-aqaqq1u2qv6kpl2z
parent: pqm at pqm.ubuntu.com-20070925212801-8p7l0qlplb0t7h2u
parent: jw+debian at jameswestby.net-20070918185500-91alkjx8zolds1v8
committer: Alexander Belchenko <bialix at ukr.net>
branch nick: james.westby
timestamp: Wed 2007-09-26 01:13:08 +0300
message:
merge with bzr.dev
------------------------------------------------------------
revno: 2831.8.1
merged: jw+debian at jameswestby.net-20070918185500-91alkjx8zolds1v8
parent: pqm at pqm.ubuntu.com-20070918045733-es6jch43pxvogvhj
committer: James Westby <jw+debian at jameswestby.net>
branch nick: bzr.dev
timestamp: Tue 2007-09-18 19:55:00 +0100
message:
Fix log against smart server branches that don't support tags. (#140615)
Add get_reverse_tag_dict to DisabledTags for branches that falsely
claim that they support tags (namely smart server branches). When the
remote branch was an old format without tags this caused log to fail.
=== modified file 'NEWS'
--- a/NEWS 2007-09-25 21:28:01 +0000
+++ b/NEWS 2007-09-25 22:13:08 +0000
@@ -88,6 +88,9 @@
contains a symbolic link.
(Vincent Ladeuil, #141382).
+ * Fix log against smart server branches that don't support tags.
+ (James Westby, #140615)
+
* HttpServer and FtpServer need to be closed properly or a listening socket
will remain opened.
(Vincent Ladeuil, #140055)
=== modified file 'bzrlib/tag.py'
--- a/bzrlib/tag.py 2007-09-11 03:07:14 +0000
+++ b/bzrlib/tag.py 2007-09-18 18:55:00 +0000
@@ -66,6 +66,10 @@
# we never have anything to copy
pass
+ def get_reverse_tag_dict(self):
+ # There aren't any tags, so the reverse mapping is empty.
+ return {}
+
class BasicTags(_Tags):
"""Tag storage in an unversioned branch control file.
=== modified file 'bzrlib/tests/test_tag.py'
--- a/bzrlib/tests/test_tag.py 2007-09-11 03:17:05 +0000
+++ b/bzrlib/tests/test_tag.py 2007-09-25 22:13:08 +0000
@@ -24,6 +24,7 @@
from bzrlib.tag import (
BasicTags,
_merge_tags_if_possible,
+ DisabledTags,
)
from bzrlib.tests import (
KnownFailure,
@@ -151,3 +152,20 @@
"https://bugs.launchpad.net/bzr/+bug/138802")
self.assertRaises(errors.NoSuchTag,
child.tags.lookup_tag, 'foo')
+
+
+class DisabledTagsTests(TestCaseWithTransport):
+
+ def setUp(self):
+ super(DisabledTagsTests, self).setUp()
+ branch = self.make_branch('.')
+ self.tags = DisabledTags(branch)
+
+ def test_supports_tags(self):
+ self.assertEqual(self.tags.supports_tags(), False)
+
+ def test_set_tag(self):
+ self.assertRaises(errors.TagsNotSupported, self.tags.set_tag)
+
+ def test_get_reverse_tag_dict(self):
+ self.assertEqual(self.tags.get_reverse_tag_dict(), {})
More information about the bazaar-commits
mailing list