/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/test_vf_search.py

  • Committer: Jelmer Vernooij
  • Date: 2018-11-12 01:41:38 UTC
  • mto: (7143.16.20 even-more-cleanups)
  • mto: This revision was merged to the branch mainline in revision 7175.
  • Revision ID: jelmer@jelmer.uk-20181112014138-3b0zyx91cu3wdq3k
More PEP8 fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
#   rev3  /
36
36
#     |  /
37
37
#   rev4
38
 
ancestry_1 = {b'rev1': [NULL_REVISION], b'rev2a': [b'rev1'], b'rev2b': [b'rev1'],
39
 
              b'rev3': [b'rev2a'], b'rev4': [b'rev3', b'rev2b']}
 
38
ancestry_1 = {b'rev1': [NULL_REVISION],
 
39
              b'rev2a': [b'rev1'],
 
40
              b'rev2b': [b'rev1'],
 
41
              b'rev3': [b'rev2a'],
 
42
              b'rev4': [b'rev3', b'rev2b']}
40
43
 
41
44
# Ancestry 2:
42
45
#
49
52
# rev3a
50
53
#   |
51
54
# rev4a
52
 
ancestry_2 = {b'rev1a': [NULL_REVISION], b'rev2a': [b'rev1a'],
53
 
              b'rev1b': [NULL_REVISION], b'rev3a': [b'rev2a'], b'rev4a': [b'rev3a']}
 
55
ancestry_2 = {b'rev1a': [NULL_REVISION],
 
56
              b'rev2a': [b'rev1a'],
 
57
              b'rev1b': [NULL_REVISION],
 
58
              b'rev3a': [b'rev2a'],
 
59
              b'rev4a': [b'rev3a']}
54
60
 
55
61
 
56
62
# Extended history shortcut
82
88
    def test_refine(self):
83
89
        # Used when pulling from a stacked repository, so test some revisions
84
90
        # being satisfied from the stacking branch.
85
 
        g = self.make_graph(
 
91
        self.make_graph(
86
92
            {b"tip": [b"mid"], b"mid": [b"base"], b"tag": [b"base"],
87
93
             b"base": [NULL_REVISION], NULL_REVISION: []})
88
 
        result = vf_search.SearchResult({b'tip', b'tag'},
89
 
                                        {NULL_REVISION}, 4, {b'tip', b'mid', b'tag', b'base'})
 
94
        result = vf_search.SearchResult(
 
95
            {b'tip', b'tag'},
 
96
            {NULL_REVISION}, 4, {b'tip', b'mid', b'tag', b'base'})
90
97
        result = result.refine({b'tip'}, {b'mid'})
91
98
        recipe = result.get_recipe()
92
99
        # We should be starting from tag (original head) and mid (seen ref)