hgweb: inline changeidctx()
authorMartin von Zweigbergk <martinvonz@google.com>
Tue, 03 Apr 2018 23:00:41 -0700
changeset 37334 6407507e12b6
parent 37333 44f3b60deafb
child 37335 956260cbc564
hgweb: inline changeidctx() Differential Revision: https://phab.mercurial-scm.org/D3074
mercurial/hgweb/webutil.py
--- 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