~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/versioning.py

  • Committer: Robert Collins
  • Date: 2005-10-30 23:58:46 UTC
  • Revision ID: robertc@robertcollins.net-20051030235846-fda8b626748cce52
Move Branch.read_working_inventory to WorkingTree.

Branch.read_working_inventory has moved to
WorkingTree.read_working_inventory. This necessitated changes to
Branch.get_root_id, and a move of Branch.set_inventory to WorkingTree
as well. To make it clear that a WorkingTree cannot always be obtained
Branch.working_tree() will raise 'errors.NoWorkingTree' if one cannot
be obtained. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
127
127
        chdir = os.chdir
128
128
        
129
129
        b = Branch.initialize('.')
 
130
        t = b.working_tree()
130
131
        self.build_tree(['src/', 'README'])
131
132
        
132
133
        eq(sorted(b.unknowns()),
141
142
        
142
143
        eq(sorted(b.unknowns()), 
143
144
           ['README'])
144
 
        eq(len(b.inventory), 3)
 
145
        eq(len(t.read_working_inventory()), 3)
145
146
                
146
147
        chdir('..')
147
148
        self.run_bzr('add')