fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added "merge_url" to document meta-data.
[redakcja.git]
/
lib
/
wlrepo
/
mercurial_backend
/
library.py
diff --git
a/lib/wlrepo/mercurial_backend/library.py
b/lib/wlrepo/mercurial_backend/library.py
index
82b5263
..
648ebe9
100644
(file)
--- a/
lib/wlrepo/mercurial_backend/library.py
+++ b/
lib/wlrepo/mercurial_backend/library.py
@@
-97,11
+97,14
@@
class MercurialLibrary(wlrepo.Library):
def get_revision(self, revid):
revid = self._sanitize_string(revid)
def get_revision(self, revid):
revid = self._sanitize_string(revid)
-
- ctx = self._changectx(revid)
+
+ try:
+ ctx = self._changectx(revid)
+ except mercurial.error.RepoError, e:
+ raise wlrepo.RevisionNotFound(revid)
if ctx is None:
if ctx is None:
- raise RevisionNotFound(revid)
+ raise
wlrepo.
RevisionNotFound(revid)
if self._revcache.has_key(ctx):
return self._revcache[ctx]
if self._revcache.has_key(ctx):
return self._revcache[ctx]
@@
-123,7
+126,7
@@
class MercurialLibrary(wlrepo.Library):
try:
self._hgrepo[revid]
return True
try:
self._hgrepo[revid]
return True
- except error.RepoError:
+ except
mercurial.
error.RepoError:
return False
def document_create(self, docid):
return False
def document_create(self, docid):
@@
-255,9
+258,6
@@
class MercurialLibrary(wlrepo.Library):
return None
if isinstance(s, unicode):
return None
if isinstance(s, unicode):
- s = s.encode('utf-8')
-
- if ' ' in s:
- raise ValueError('Whitespace is forbidden!')
+ s = s.encode('utf-8')
return s
\ No newline at end of file
return s
\ No newline at end of file