hgweb: drop support for "manifest" parameter
authorMartin von Zweigbergk <martinvonz@google.com>
Tue, 03 Apr 2018 21:50:42 -0700
changeset 37333 44f3b60deafb
parent 37332 b48b7b130d08
child 37334 6407507e12b6
hgweb: drop support for "manifest" parameter AFAICT (but note that this is the first time I look at hgweb code), the "mercurial" query parameter was removed from rendered pages in 36fa5db79dd5 (hgweb: convert gitweb to NWI, 2006-10-05). Search for "manifest=" in that diff to see why I think it was removed. It's about time we stop looking for the parameter in requests. Differential Revision: https://phab.mercurial-scm.org/D3073
mercurial/hgweb/webutil.py
--- a/mercurial/hgweb/webutil.py	Wed Apr 04 10:32:48 2018 -0700
+++ b/mercurial/hgweb/webutil.py	Tue Apr 03 21:50:42 2018 -0700
@@ -296,13 +296,7 @@
     return pathutil.canonpath(repo.root, '', path)
 
 def changeidctx(repo, changeid):
-    try:
-        ctx = repo[changeid]
-    except error.RepoError:
-        man = repo.manifestlog._revlog
-        ctx = repo[man.linkrev(man.rev(man.lookup(changeid)))]
-
-    return ctx
+    return repo[changeid]
 
 def changectx(repo, req):
     changeid = "tip"
@@ -311,8 +305,6 @@
         ipos = changeid.find(':')
         if ipos != -1:
             changeid = changeid[(ipos + 1):]
-    elif 'manifest' in req.qsparams:
-        changeid = req.qsparams['manifest']
 
     return changeidctx(repo, changeid)