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

Clean up trailing whitespace.

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
    _git_class = Blob
68
68
 
69
69
    def __init__(self, inv, parent_id, hexsha, path, basename, executable):
70
 
        super(GitInventoryFile, self).__init__(inv, parent_id, hexsha, path, basename, executable)
 
70
        super(GitInventoryFile, self).__init__(inv, parent_id, hexsha, path,
 
71
            basename, executable)
71
72
        self.kind = 'file'
72
73
        self.text_id = None
73
74
        self.symlink_target = None
95
96
        return ''
96
97
 
97
98
    def copy(self):
98
 
        other = inventory.InventoryFile(self.file_id, self.name, self.parent_id)
 
99
        other = inventory.InventoryFile(self.file_id, self.name,
 
100
            self.parent_id)
99
101
        other.executable = self.executable
100
102
        other.text_id = self.text_id
101
103
        other.text_sha1 = self.text_sha1
183
185
            self._children[basename] = kind_class(self._inventory, self.file_id, hexsha, child_path, basename, executable)
184
186
 
185
187
    def copy(self):
186
 
        other = inventory.InventoryDirectory(self.file_id, self.name, 
 
188
        other = inventory.InventoryDirectory(self.file_id, self.name,
187
189
                                             self.parent_id)
188
190
        other.revision = self.revision
189
191
        # note that children are *not* copied; they're pulled across when
205
207
        parts = path.split("/")
206
208
        ie = self.root
207
209
        for name in parts:
208
 
            ie = ie.children[name] 
 
210
            ie = ie.children[name]
209
211
        return ie
210
212
 
211
213
    def has_filename(self, path):
255
257
        self.mapping = mapping
256
258
        self.index = index
257
259
        self._contents_read = False
258
 
        self.root = self.add_path("", 'directory', 
 
260
        self.root = self.add_path("", 'directory',
259
261
            self.mapping.generate_file_id(""), None)
260
262
 
261
263
    def iter_entries_by_dir(self, specific_file_ids=None, yield_parents=False):
299
301
        pb = ui.ui_factory.nested_progress_bar()
300
302
        try:
301
303
            for i, (path, value) in enumerate(self.index.iteritems()):
302
 
                pb.update("creating working inventory from index", 
 
304
                pb.update("creating working inventory from index",
303
305
                        i, len(self.index))
304
306
                assert isinstance(path, str)
305
307
                assert isinstance(value, tuple) and len(value) == 10
318
320
                    self.add_parents(path)
319
321
                    self.add(old_ie)
320
322
                else:
321
 
                    ie = self.add_path(path, kind, file_id, self.add_parents(path))
 
323
                    ie = self.add_path(path, kind, file_id,
 
324
                        self.add_parents(path))
322
325
                    data = store[sha].data
323
326
                    if kind == "symlink":
324
327
                        ie.symlink_target = data
337
340
                parent_fid = None
338
341
            else:
339
342
                parent_fid = self.add_parents(dirname)
340
 
            ie = self.add_path(dirname, 'directory', 
 
343
            ie = self.add_path(dirname, 'directory',
341
344
                    self.mapping.generate_file_id(dirname), parent_fid)
342
345
            if ie.file_id in self.basis_inv:
343
346
                ie.revision = self.basis_inv[ie.file_id].revision