~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bundle/bundle_data.py

  • Committer: INADA Naoki
  • Date: 2011-05-17 00:45:09 UTC
  • mfrom: (5875 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5891.
  • Revision ID: songofacandy@gmail.com-20110517004509-q58negjbdjh7t6u1
mergeĀ fromĀ lp:bzr

Show diffs side-by-side

added added

removed removed

Lines of Context:
641
641
                'Malformed patch for %s, %r' % (file_id, file_patch))
642
642
        return patched_file(file_patch, patch_original)
643
643
 
644
 
    def get_symlink_target(self, file_id):
645
 
        new_path = self.id2path(file_id)
 
644
    def get_symlink_target(self, file_id, path=None):
 
645
        if path is None:
 
646
            path = self.id2path(file_id)
646
647
        try:
647
 
            return self._targets[new_path]
 
648
            return self._targets[path]
648
649
        except KeyError:
649
650
            return self.base_tree.get_symlink_target(file_id)
650
651
 
715
716
                ie.executable = self.is_executable(file_id)
716
717
            elif kind == 'symlink':
717
718
                ie = InventoryLink(file_id, name, parent_id)
718
 
                ie.symlink_target = self.get_symlink_target(file_id)
 
719
                ie.symlink_target = self.get_symlink_target(file_id, path)
719
720
            ie.revision = revision_id
720
721
 
721
722
            if kind == 'file':
763
764
        paths = []
764
765
        for result in self._new_id.iteritems():
765
766
            paths.append(result)
766
 
        for id in self.base_tree:
 
767
        for id in self.base_tree.all_file_ids():
767
768
            path = self.id2path(id)
768
769
            if path is None:
769
770
                continue