fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Unicode errors in filebrowser. Refs #372.
[redakcja.git]
/
lib
/
vstorage.py
diff --git
a/lib/vstorage.py
b/lib/vstorage.py
index
ea8d522
..
00f844a
100644
(file)
--- a/
lib/vstorage.py
+++ b/
lib/vstorage.py
@@
-144,7
+144,7
@@
class VersionedStorage(object):
return urlunquote(name)
def __contains__(self, title):
return urlunquote(name)
def __contains__(self, title):
- return
title in self.all_pages()
+ return
urlquote(title) in self.repo.dirstate
def __iter__(self):
return self.all_pages()
def __iter__(self):
return self.all_pages()
@@
-265,7
+265,6
@@
class VersionedStorage(object):
def open_page(self, title):
if title not in self:
def open_page(self, title):
if title not in self:
- print 'whatever', list(self.all_pages())
raise DocumentNotFound()
try:
raise DocumentNotFound()
try:
@@
-285,11
+284,12
@@
class VersionedStorage(object):
def page_meta(self, title):
"""Get page's revision, date, last editor and his edit comment."""
def page_meta(self, title):
"""Get page's revision, date, last editor and his edit comment."""
-
+ if not title in self:
+ raise DocumentNotFound()
+
filectx_tip = self._find_filectx(title)
if filectx_tip is None:
raise DocumentNotFound()
filectx_tip = self._find_filectx(title)
if filectx_tip is None:
raise DocumentNotFound()
- #return -1, None, u'', u''
rev = filectx_tip.filerev()
filectx = filectx_tip.filectx(rev)
date = datetime.datetime.fromtimestamp(filectx.date()[0])
rev = filectx_tip.filerev()
filectx = filectx_tip.filectx(rev)
date = datetime.datetime.fromtimestamp(filectx.date()[0])