~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-05-13 16:59:44 UTC
  • mfrom: (5858.1.1 symlink-target-path)
  • Revision ID: pqm@pqm.ubuntu.com-20110513165944-rv579ds1kciopi4n
(jelmer) Add optional path argument to Tree.get_symlink_target(). (Jelmer
 Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
863
863
        self.add(path, file_id, 'directory')
864
864
        return file_id
865
865
 
866
 
    def get_symlink_target(self, file_id):
867
 
        abspath = self.id2abspath(file_id)
 
866
    def get_symlink_target(self, file_id, path=None):
 
867
        if path is not None:
 
868
            abspath = self.abspath(path)
 
869
        else:
 
870
            abspath = self.id2abspath(file_id)
868
871
        target = osutils.readlink(abspath)
869
872
        return target
870
873