/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/plugins/fastimport/bzr_commit_handler.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2019-09-22 14:21:48 UTC
  • mfrom: (7391.1.1 fastimport-no-id2path)
  • Revision ID: breezy.the.bot@gmail.com-20190922142148-mc3fkl4ttagj84l2
Avoid use of id2path in the fastimport plugin.

Merged from https://code.launchpad.net/~jelmer/brz/fastimport-no-id2path/+merge/373062

Show diffs side-by-side

added added

removed removed

Lines of Context:
505
505
            if newly_changed:
506
506
                content = self.data_for_commit[file_id]
507
507
            else:
508
 
                content = self.rev_store.get_file_text(
509
 
                    self.parents[0], file_id)
 
508
                revtree = self.rev_store.repo.revision_tree(self.parents[0])
 
509
                content = revtree.get_file_text(src_path)
510
510
            self._modify_item(dest_path, kind, ie.executable, content, inv)
511
511
        elif kind == 'symlink':
512
512
            self._modify_item(dest_path, kind, False,
540
540
        # The revision-id for this entry will be/has been updated and
541
541
        # that means the loader then needs to know what the "new" text is.
542
542
        # We therefore must go back to the revision store to get it.
543
 
        lines = self.rev_store.get_file_lines(rev_id, file_id)
 
543
        lines = self.rev_store.get_file_lines(rev_id, old_path)
544
544
        self.data_for_commit[file_id] = b''.join(lines)
545
545
 
546
546
    def _delete_all_items(self, inv):