- path = self._revision._docname + '.' + entry
- return self._library._filectx(path, \
- self._revision.hgrev()).data()
+ path = self._library._sanitize_string(self.id + u'.' + entry)
+ try:
+ return self._library._filectx(path, \
+ self._revision.hgrev()).data().decode('utf-8')
+ except mercurial.error.LookupError, e:
+ fl = [x.decode('utf-8') for x in self._revision._changectx]
+ raise wlrepo.EntryNotFound(self._revision, path.decode('utf-8'), fl)