Comments
Patch
@@ -183,9 +183,10 @@ def listbookmarks(repo):
marks = getattr(repo, '_bookmarks', {})
d = {}
+ hasnode = repo.changelog.hasnode
for k, v in marks.iteritems():
# don't expose local divergent bookmarks
- if '@' not in k or k.endswith('@'):
+ if hasnode(v) and ('@' not in k or k.endswith('@')):
d[k] = hex(v)
return d
@@ -1386,4 +1386,10 @@ bookmarks view doesn't choke on bookmark
$ QUERY_STRING='style=raw'
$ python hgweb.cgi
+listbookmarks hides secret bookmarks
+
+ $ PATH_INFO=/; export PATH_INFO
+ $ QUERY_STRING='cmd=listkeys&namespace=bookmarks'
+ $ python hgweb.cgi
+
$ cd ..