/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/bundle/serializer/v08.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-11-16 15:19:49 UTC
  • mfrom: (7141.7.6 no-file-ids)
  • Revision ID: breezy.the.bot@gmail.com-20181116151949-hrmuv6s7ow1cqdhi
Drop file_id argument from read functions in Tree.

Merged from https://code.launchpad.net/~jelmer/brz/no-file-ids/+merge/357984

Show diffs side-by-side

added added

removed removed

Lines of Context:
273
273
        def do_diff(file_id, old_path, new_path, action, force_binary):
274
274
            def tree_lines(tree, path, require_text=False):
275
275
                if tree.has_id(file_id):
276
 
                    tree_file = tree.get_file(path, file_id)
 
276
                    tree_file = tree.get_file(path)
277
277
                    if require_text is True:
278
278
                        tree_file = text_file(tree_file)
279
279
                    return tree_file.readlines()
318
318
        for path, file_id, kind in delta.added:
319
319
            action = Action('added', [kind, path], [('file-id', file_id.decode('utf-8'))])
320
320
            meta_modified = (kind=='file' and
321
 
                             new_tree.is_executable(path, file_id))
 
321
                             new_tree.is_executable(path))
322
322
            finish_action(action, file_id, kind, meta_modified, True,
323
323
                          DEVNULL, path)
324
324
 
335
335
                          path, path)
336
336
 
337
337
        for path, file_id, kind in delta.unchanged:
338
 
            new_rev = new_tree.get_file_revision(path, file_id)
 
338
            new_rev = new_tree.get_file_revision(path)
339
339
            if new_rev is None:
340
340
                continue
341
 
            old_rev = old_tree.get_file_revision(old_tree.id2path(file_id), file_id)
 
341
            old_rev = old_tree.get_file_revision(old_tree.id2path(file_id))
342
342
            if new_rev != old_rev:
343
 
                action = Action('modified', [new_tree.kind(path, file_id),
 
343
                action = Action('modified', [new_tree.kind(path),
344
344
                                             path])
345
345
                action.add_utf8_property('last-changed', new_rev)
346
346
                action.write(self.to_file)