/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/blackbox/test_revno.py

  • Committer: Jelmer Vernooij
  • Date: 2017-11-16 00:39:04 UTC
  • mto: This revision was merged to the branch mainline in revision 6818.
  • Revision ID: jelmer@jelmer.uk-20171116003904-p6lcb827m6thxbzd
Migrate some build_snapshot code over to having revision_id as keyword argument.

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
    def test_dotted_revno_tree(self):
84
84
        builder = self.make_branch_builder('branch')
85
85
        builder.start_series()
86
 
        builder.build_snapshot('A-id', None, [
 
86
        builder.build_snapshot(None, [
87
87
            ('add', ('', 'root-id', 'directory', None)),
88
 
            ('add', ('file', 'file-id', 'file', 'content\n'))])
89
 
        builder.build_snapshot('B-id', ['A-id'], [])
90
 
        builder.build_snapshot('C-id', ['A-id', 'B-id'], [])
 
88
            ('add', ('file', 'file-id', 'file', 'content\n'))],
 
89
            revision_id='A-id')
 
90
        builder.build_snapshot(['A-id'], [], revision_id='B-id')
 
91
        builder.build_snapshot(['A-id', 'B-id'], [], revision_id='C-id')
91
92
        builder.finish_series()
92
93
        b = builder.get_branch()
93
94
        co_b = b.create_checkout('checkout_b', lightweight=True,
102
103
    def test_stale_revno_tree(self):
103
104
        builder = self.make_branch_builder('branch')
104
105
        builder.start_series()
105
 
        builder.build_snapshot('A-id', None, [
 
106
        builder.build_snapshot(None, [
106
107
            ('add', ('', 'root-id', 'directory', None)),
107
 
            ('add', ('file', 'file-id', 'file', 'content\n'))])
108
 
        builder.build_snapshot('B-id', ['A-id'], [])
109
 
        builder.build_snapshot('C-id', ['A-id'], [])
 
108
            ('add', ('file', 'file-id', 'file', 'content\n'))],
 
109
            revision_id='A-id')
 
110
        builder.build_snapshot(['A-id'], [], revision_id='B-id')
 
111
        builder.build_snapshot(['A-id'], [], revision_id='C-id')
110
112
        builder.finish_series()
111
113
        b = builder.get_branch()
112
114
        # The branch is now at "C-id", but the checkout is still at "B-id"