D3074: hgweb: inline changeidctx()

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Wed Apr 4 18:25:55 UTC 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHG6407507e12b6: hgweb: inline changeidctx() (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3074?vs=7623&id=7630

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

AFFECTED FILES
  mercurial/hgweb/webutil.py

CHANGE DETAILS

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



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


More information about the Mercurial-devel mailing list