Comments
Patch
@@ -3452,10 +3452,16 @@ def reposetup(ui, repo):
except error.LookupError:
self.ui.warn(_('mq status file refers to unknown node %s\n')
% short(mqtags[-1][0]))
return result
+ # do not add fake tags for filtered revision
+ included = self.changelog.hasnode
+ mqtags = [mqt for mqt in mqtags if included(mqt[0])]
+ if not mqtags:
+ return result
+
mqtags.append((mqtags[-1][0], 'qtip'))
mqtags.append((mqtags[0][0], 'qbase'))
mqtags.append((self.changelog.parents(mqtags[0][0])[0], 'qparent'))
tags = result[0]
for patch in mqtags:
@@ -1553,6 +1553,26 @@ Test that qfinish preserve phase when mq
$ hg phase 'all()'
0: draft
1: secret
2: secret
+Test that secret mq patch does not break hgweb
+
+ $ cat > hgweb.cgi <<HGWEB
+ > from mercurial import demandimport; demandimport.enable()
+ > from mercurial.hgweb import hgweb
+ > from mercurial.hgweb import wsgicgi
+ > import cgitb
+ > cgitb.enable()
+ > app = hgweb('.', 'test')
+ > wsgicgi.launch(app)
+ > HGWEB
+ $ . "$TESTDIR/cgienv"
+ $ PATH_INFO=/tags; export PATH_INFO
+ $ QUERY_STRING='style=raw'
+ $ python hgweb.cgi | grep -v ETag:
+ Status: 200 Script output follows\r (esc)
+ Content-Type: text/plain; charset=ascii\r (esc)
+ \r (esc)
+ tip [0-9a-f]{40} (re)
+
$ cd ..