~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bundle.py

  • Committer: Vincent Ladeuil
  • Date: 2012-03-08 18:30:33 UTC
  • mfrom: (6487 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6488.
  • Revision ID: v.ladeuil+lp@free.fr-20120308183033-bccqnbr1tpozs711
Merge bzr.dev resolving conflicts

Show diffs side-by-side

added added

removed removed

Lines of Context:
80
80
    def get_root_id(self):
81
81
        return self.root.file_id
82
82
 
83
 
    def get_root_id(self):
84
 
        return self.root.file_id
85
 
 
86
83
    def all_file_ids(self):
87
84
        return set(self.paths.keys())
88
85
 
114
111
        return kind
115
112
 
116
113
    def make_entry(self, file_id, path):
117
 
        from bzrlib.inventory import (InventoryEntry, InventoryFile
118
 
                                    , InventoryDirectory, InventoryLink)
 
114
        from bzrlib.inventory import (InventoryFile , InventoryDirectory,
 
115
            InventoryLink)
119
116
        name = os.path.basename(path)
120
117
        kind = self.kind(file_id)
121
118
        parent_id = self.parent_id(file_id)
158
155
    def get_file_revision(self, file_id):
159
156
        return self.inventory[file_id].revision
160
157
 
 
158
    def get_file_size(self, file_id):
 
159
        return self.inventory[file_id].text_size
 
160
 
 
161
    def get_file_sha1(self, file_id):
 
162
        return self.inventory[file_id].text_sha1
 
163
 
161
164
    def contents_stats(self, file_id):
162
165
        if file_id not in self.contents:
163
166
            return None, None
326
329
        self.assertTrue(btree.path2id("grandparent/parent/file") is None)
327
330
 
328
331
    def sorted_ids(self, tree):
329
 
        ids = list(tree)
 
332
        ids = list(tree.all_file_ids())
330
333
        ids.sort()
331
334
        return ids
332
335