/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/per_workingtree/test_inv.py

  • Committer: Jelmer Vernooij
  • Date: 2019-06-29 13:16:26 UTC
  • mto: This revision was merged to the branch mainline in revision 7376.
  • Revision ID: jelmer@jelmer.uk-20190629131626-qioafloyemhdbm4w
Remove Tree.get_root_id() in favour of Tree.path2id('').

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
        wt = self.make_branch_and_tree('.')
54
54
        wt.lock_write()
55
55
        self.addCleanup(wt.unlock)
56
 
        root_id = wt.get_root_id()
 
56
        root_id = wt.path2id('')
57
57
        wt.apply_inventory_delta([(None, 'bar/foo', b'foo-id',
58
58
                                   inventory.InventoryFile(b'foo-id', 'foo', parent_id=b'bar-id')),
59
59
                                  (None, 'bar', b'bar-id', inventory.InventoryDirectory(b'bar-id',
74
74
    def test_rename_dir_with_children(self):
75
75
        wt = self.make_branch_and_tree('.')
76
76
        wt.lock_write()
77
 
        root_id = wt.get_root_id()
 
77
        root_id = wt.path2id('')
78
78
        self.addCleanup(wt.unlock)
79
79
        self.build_tree(['foo/', 'foo/bar'])
80
80
        wt.add(['foo', 'foo/bar'],
88
88
    def test_rename_dir_with_children_with_children(self):
89
89
        wt = self.make_branch_and_tree('.')
90
90
        wt.lock_write()
91
 
        root_id = wt.get_root_id()
 
91
        root_id = wt.path2id('')
92
92
        self.addCleanup(wt.unlock)
93
93
        self.build_tree(['foo/', 'foo/bar/', 'foo/bar/baz'])
94
94
        wt.add(['foo', 'foo/bar', 'foo/bar/baz'],
118
118
        """
119
119
        wt = self.make_branch_and_tree('.')
120
120
        wt.lock_write()
121
 
        root_id = wt.get_root_id()
 
121
        root_id = wt.path2id('')
122
122
        self.addCleanup(wt.unlock)
123
123
        self.build_tree(['foo/', 'foo/bar', 'baz/', 'baz/qux'])
124
124
        wt.add(['foo', 'foo/bar', 'baz', 'baz/qux'],
137
137
         unable to find the child.)
138
138
        """
139
139
        wt = self.make_branch_and_tree('.')
140
 
        root_id = wt.get_root_id()
 
140
        root_id = wt.path2id('')
141
141
        self.build_tree(['dir/', 'dir/child', 'other/'])
142
142
        wt.add(['dir', 'dir/child', 'other'],
143
143
               [b'dir-id', b'child-id', b'other-id'])
155
155
        wt.lock_write()
156
156
        self.addCleanup(wt.unlock)
157
157
 
158
 
        root_id = wt.get_root_id()
 
158
        root_id = wt.path2id('')
159
159
        wt.apply_inventory_delta([('', None, root_id, None),
160
160
                                  (None, '', b'root-id',
161
161
                                   inventory.InventoryDirectory(b'root-id', '', None))])