X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/09c2bec530540e51e71822a8269bb994cc144065..f53e407d37ef0c786b280e6bc1b2f3dcace714a7:/lib/wlrepo/mercurial_backend/library.py diff --git a/lib/wlrepo/mercurial_backend/library.py b/lib/wlrepo/mercurial_backend/library.py index 8c57f038..4c072cb8 100644 --- a/lib/wlrepo/mercurial_backend/library.py +++ b/lib/wlrepo/mercurial_backend/library.py @@ -96,16 +96,12 @@ class MercurialLibrary(wlrepo.Library): return self.document_for_rev(self.fulldocid(docid, user)) def get_revision(self, revid): - revid = self._sanitize_string(revid).decode('utf-8') + revid = self._sanitize_string(revid) print "Looking up rev %r (%s)" %(revid, type(revid)) - try: - # 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.decode('utf-8') ) + try: + ctx = self._changectx( revid ) except mercurial.error.RepoError, e: raise wlrepo.RevisionNotFound(revid)