hgweb: inline changeidctx()
Differential Revision: https://phab.mercurial-scm.org/D3074
--- a/mercurial/hgweb/webutil.py Tue Apr 03 21:50:42 2018 -0700
+++ b/mercurial/hgweb/webutil.py Tue Apr 03 23:00:41 2018 -0700
@@ -295,9 +295,6 @@
path = path.lstrip('/')
return pathutil.canonpath(repo.root, '', path)
-def changeidctx(repo, changeid):
- return repo[changeid]
-
def changectx(repo, req):
changeid = "tip"
if 'node' in req.qsparams:
@@ -306,7 +303,7 @@
if ipos != -1:
changeid = changeid[(ipos + 1):]
- return changeidctx(repo, changeid)
+ return repo[changeid]
def basechangectx(repo, req):
if 'node' in req.qsparams:
@@ -314,7 +311,7 @@
ipos = changeid.find(':')
if ipos != -1:
changeid = changeid[:ipos]
- return changeidctx(repo, changeid)
+ return repo[changeid]
return None