def documents(self):
- return [ key[5:] for key in \
+ return [ key[5:].decode('utf-8') for key in \
self._hgrepo.branchmap() if key.startswith("$doc:") ]
@property
if revision is None:
raise ValueError("Revision can't be None.")
- if not isinstance(revision, MercurialRevision):
- revision = self._sanitize_string(unicode(revision))
+ if not isinstance(revision, MercurialRevision):
rev = self.get_revision(revision)
else:
rev = revision
return self.document_for_rev(self.fulldocid(docid, user))
def get_revision(self, revid):
- revid = self._sanitize_string(revid)
+ revid = self._sanitize_string(revid).decode('utf-8')
+
+ print "Looking up rev %r (%s)" %(revid, type(revid))
try:
- ctx = self._changectx(revid)
+ # THIS IS THE MOST BRAIN-DEAD API I EVER SEEN
+ # WHY DO ALL THE OTHER METHODS SIMPLY
+ # FAIL WHEN GIVEN UNICODE, WHEN THIS WORKS ONLY!! WITH IT
+
+ ctx = self._changectx( revid )
except mercurial.error.RepoError, e:
raise wlrepo.RevisionNotFound(revid)
fulldocid += u'$doc:' + docid
return fulldocid
-
def has_revision(self, revid):
try:
self._hgrepo[revid]