Merge lp:~jelmer/brz/ghost-tags into lp:brz

Proposed by Jelmer Vernooij on 2018-11-17
Status: Merged
Approved by: Martin Packman on 2018-11-17
Approved revision: 7191
Merge reported by: The Breezy Bot
Merged at revision: not available
Proposed branch: lp:~jelmer/brz/ghost-tags
Merge into: lp:brz
Diff against target: 35 lines (+6/-4)
1 file modified
breezy/tests/per_branch/test_pull.py (+6/-4)
To merge this branch: bzr merge lp:~jelmer/brz/ghost-tags
Reviewer Review Type Date Requested Status
Martin Packman 2018-11-17 Approve on 2018-11-17
Review via email: mp+358949@code.launchpad.net

Commit message

Don't create ghost tags when testing overwrite behaviour.

Description of the change

Don't create ghost tags when testing overwrite behaviour.

To post a comment you must log in.
Martin Packman (gz) wrote :

Thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'breezy/tests/per_branch/test_pull.py'
2--- breezy/tests/per_branch/test_pull.py 2018-11-16 12:52:18 +0000
3+++ breezy/tests/per_branch/test_pull.py 2018-11-17 21:02:03 +0000
4@@ -173,9 +173,9 @@
5 tree_a.branch.tags.set_tag('tag1', rev1)
6
7 tree_b = tree_a.controldir.sprout('tree_b').open_workingtree()
8- rev2a = tree_a.commit('message 2a')
9- tree_b.branch.tags.set_tag('tag1', rev2a)
10 rev2b = tree_b.commit('message 2b')
11+ tree_b.branch.tags.set_tag('tag1', rev2b)
12+ rev1b = tree_a.commit('message 1b')
13 tree_a.branch.get_config_stack().set('branch.fetch_tags', True)
14 self.assertRaises(errors.DivergedBranches, tree_a.pull, tree_b.branch)
15 self.assertRaises(errors.DivergedBranches,
16@@ -183,7 +183,9 @@
17 overwrite=set(), stop_revision=rev2b)
18 # It should not have updated the branch tip, but it should have fetched
19 # the revision if the repository supports "invisible" revisions
20- self.assertEqual(rev2a, tree_a.branch.last_revision())
21+ self.assertEqual(rev1b, tree_a.branch.last_revision())
22+ # It also should not have updated the tags
23+ self.assertEqual(tree_a.branch.tags.get_tag_dict(), {'tag1': rev1})
24 if tree_a.branch.repository._format.supports_unreferenced_revisions:
25 self.assertTrue(tree_a.branch.repository.has_revision(rev2b))
26 tree_a.branch.pull(tree_b.branch, overwrite=set(['history']),
27@@ -194,7 +196,7 @@
28 self.assertEqual(rev1, tree_a.branch.tags.lookup_tag('tag1'))
29 tree_a.branch.pull(tree_b.branch, overwrite=set(['history', 'tags']),
30 stop_revision=rev2b)
31- self.assertEqual(rev2a, tree_a.branch.tags.lookup_tag('tag1'))
32+ self.assertEqual(rev2b, tree_a.branch.tags.lookup_tag('tag1'))
33
34 def test_pull_merges_and_fetches_tags(self):
35 """Tags are updated by br.pull(source), and revisions named in those

Subscribers

People subscribed via source and target branches