/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_commit.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2019-07-26 00:52:04 UTC
  • mfrom: (7358.14.2 get-root-id)
  • Revision ID: breezy.the.bot@gmail.com-20190726005204-fapfcsnonmr0e3r3
Remove Tree.get_root_id() in favour of Tree.path2id('').

Merged from https://code.launchpad.net/~jelmer/brz/get-root-id/+merge/369477

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
        osutils.rmtree('a/dir')
54
54
        tree_a.commit('autoremoved')
55
55
 
56
 
        tree_a.lock_read()
57
 
        try:
58
 
            root_id = tree_a.get_root_id()
 
56
        with tree_a.lock_read():
 
57
            root_id = tree_a.path2id('')
59
58
            paths = [(path, ie.file_id)
60
59
                     for path, ie in tree_a.iter_entries_by_dir()]
61
 
        finally:
62
 
            tree_a.unlock()
63
60
        # The only paths left should be the root
64
61
        self.assertEqual([('', root_id)], paths)
65
62