/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 bzrlib/tests/per_tree/test_inv.py

  • Committer: INADA Naoki
  • Date: 2011-05-17 00:45:09 UTC
  • mfrom: (5875 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5891.
  • Revision ID: songofacandy@gmail.com-20110517004509-q58negjbdjh7t6u1
mergeĀ fromĀ lp:bzr

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
    return tree.iter_entries_by_dir([file_id]).next()[1]
35
35
 
36
36
 
37
 
class TestPreviousHeads(per_tree.TestCaseWithTree):
38
 
 
39
 
    def setUp(self):
40
 
        # we want several inventories, that respectively
41
 
        # give use the following scenarios:
42
 
        # A) fileid not in any inventory (A),
43
 
        # B) fileid present in one inventory (B) and (A,B)
44
 
        # C) fileid present in two inventories, and they
45
 
        #   are not mutual descendents (B, C)
46
 
        # D) fileid present in two inventories and one is
47
 
        #   a descendent of the other. (B, D)
48
 
        super(TestPreviousHeads, self).setUp()
49
 
        self.wt = self.make_branch_and_tree('.')
50
 
        self.branch = self.wt.branch
51
 
        self.build_tree(['file'])
52
 
        self.wt.commit('new branch', allow_pointless=True, rev_id='A')
53
 
        self.inv_A = self.branch.repository.get_inventory('A')
54
 
        self.wt.add(['file'], ['fileid'])
55
 
        self.wt.commit('add file', rev_id='B')
56
 
        self.inv_B = self.branch.repository.get_inventory('B')
57
 
        uncommit(self.branch, tree=self.wt)
58
 
        self.assertEqual(self.branch.revision_history(), ['A'])
59
 
        self.wt.commit('another add of file', rev_id='C')
60
 
        self.inv_C = self.branch.repository.get_inventory('C')
61
 
        self.wt.add_parent_tree_id('B')
62
 
        self.wt.commit('merge in B', rev_id='D')
63
 
        self.inv_D = self.branch.repository.get_inventory('D')
64
 
        self.tree = self.workingtree_to_test_tree(self.wt)
65
 
        self.tree.lock_read()
66
 
        self.addCleanup(self.tree.unlock)
67
 
        self.file_active = get_entry(self.tree, 'fileid')
68
 
 
69
 
    # TODO: test two inventories with the same file revision
70
 
 
71
 
 
72
37
class TestInventoryWithSymlinks(per_tree.TestCaseWithTree):
73
38
 
74
39
    _test_needs_features = [tests.SymlinkFeature]