~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/hashcache.py

  • Committer: Johan Walles
  • Date: 2009-05-06 05:36:28 UTC
  • mfrom: (4332 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4343.
  • Revision ID: johan.walles@gmail.com-20090506053628-tbf1wz4a0m9t684g
MergeĀ fromĀ upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
180
180
                filters = self._filter_provider(path=path, file_id=None)
181
181
            digest = self._really_sha1_file(abspath, filters)
182
182
        elif stat.S_ISLNK(mode):
183
 
            digest = osutils.sha_string(os.readlink(abspath))
 
183
            target = osutils.readlink(osutils.safe_unicode(abspath))
 
184
            digest = osutils.sha_string(target.encode('UTF-8'))
184
185
        else:
185
186
            raise errors.BzrError("file %r: unknown file stat mode: %o"
186
187
                                  % (abspath, mode))