Rev 6030: Catch a couple more cases that test tag fetching. in http://bazaar.launchpad.net/~jameinel/bzr/2.4-tag-fetch-flag-771184
John Arbash Meinel
john at arbash-meinel.com
Tue Aug 9 14:18:08 UTC 2011
At http://bazaar.launchpad.net/~jameinel/bzr/2.4-tag-fetch-flag-771184
------------------------------------------------------------
revno: 6030
revision-id: john at arbash-meinel.com-20110809141805-9lq771mvpsukl0pe
parent: john at arbash-meinel.com-20110809134626-1lbpwlyes6vh1wiy
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.4-tag-fetch-flag-771184
timestamp: Tue 2011-08-09 16:18:05 +0200
message:
Catch a couple more cases that test tag fetching.
-------------- next part --------------
=== modified file 'bzrlib/tests/per_branch/test_pull.py'
--- a/bzrlib/tests/per_branch/test_pull.py 2011-02-09 06:36:35 +0000
+++ b/bzrlib/tests/per_branch/test_pull.py 2011-08-09 14:18:05 +0000
@@ -156,6 +156,7 @@
except errors.TagsNotSupported:
raise TestNotApplicable('format does not support tags.')
source.tags.set_tag('tag-a', 'rev-2')
+ source.get_config().set_user_option('branch.fetch_tags', 'True')
target.pull(source)
# The tag is present, and so is its revision.
self.assertEqual('rev-2', target.tags.lookup_tag('tag-a'))
@@ -177,6 +178,7 @@
source.tags.set_tag('tag-a', 'rev-2')
except errors.TagsNotSupported:
raise TestNotApplicable('format does not support tags.')
+ source.get_config().set_user_option('branch.fetch_tags', 'True')
target.pull(source, 'rev-2-again')
# The tag is present, and so is its revision.
self.assertEqual('rev-2', target.tags.lookup_tag('tag-a'))
=== modified file 'bzrlib/tests/test_remote.py'
--- a/bzrlib/tests/test_remote.py 2011-08-09 13:23:10 +0000
+++ b/bzrlib/tests/test_remote.py 2011-08-09 14:18:05 +0000
@@ -1183,6 +1183,28 @@
client.add_expected_call(
'Branch.last_revision_info', ('quack/',),
'success', ('ok', '1', 'rev-tip'))
+ client.add_expected_call(
+ 'Branch.get_config_file', ('quack/',),
+ 'success', ('ok',), '')
+ transport.mkdir('quack')
+ transport = transport.clone('quack')
+ branch = self.make_remote_branch(transport, client)
+ result = branch.heads_to_fetch()
+ self.assertFinished(client)
+ self.assertEqual((set(['rev-tip']), set()), result)
+
+ def test_uses_last_revision_info_and_tags_when_set(self):
+ transport = MemoryTransport()
+ client = FakeClient(transport.base)
+ client.add_expected_call(
+ 'Branch.get_stacked_on_url', ('quack/',),
+ 'error', ('NotStacked',))
+ client.add_expected_call(
+ 'Branch.last_revision_info', ('quack/',),
+ 'success', ('ok', '1', 'rev-tip'))
+ client.add_expected_call(
+ 'Branch.get_config_file', ('quack/',),
+ 'success', ('ok',), 'branch.fetch_tags = True')
# XXX: this will break if the default format's serialization of tags
# changes, or if the RPC for fetching tags changes from get_tags_bytes.
client.add_expected_call(
More information about the bazaar-commits
mailing list