Patchwork D3073: hgweb: drop support for "manifest" parameter

login
register
mail settings
Submitter phabricator
Date April 4, 2018, 4:41 p.m.
Message ID <differential-rev-PHID-DREV-rnu3cdzgx2bma5hxnqs4-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/30264/
State Superseded
Headers show

Comments

phabricator - April 4, 2018, 4:41 p.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  AFAICT (but note that this is the first time I look at hgweb code),
  the "mercurial" query parameter was removed from rendered pages in
  https://phab.mercurial-scm.org/rHG36fa5db79dd5c96546c5cb23da6d9aebb6564316 (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.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3073

AFFECTED FILES
  mercurial/hgweb/webutil.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel
phabricator - April 4, 2018, 6:19 p.m.
durin42 accepted this revision.
durin42 added a comment.
This revision is now accepted and ready to land.


  killing this with fire

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3073

To: martinvonz, #hg-reviewers, durin42
Cc: durin42, mercurial-devel

Patch

diff --git a/mercurial/hgweb/webutil.py b/mercurial/hgweb/webutil.py
--- a/mercurial/hgweb/webutil.py
+++ b/mercurial/hgweb/webutil.py
@@ -296,23 +296,15 @@ 
     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"
     if 'node' in req.qsparams:
         changeid = req.qsparams['node']
         ipos = changeid.find(':')
         if ipos != -1:
             changeid = changeid[(ipos + 1):]
-    elif 'manifest' in req.qsparams:
-        changeid = req.qsparams['manifest']
 
     return changeidctx(repo, changeid)