Patchwork D3074: hgweb: inline changeidctx()

login
register
mail settings
Submitter phabricator
Date April 4, 2018, 4:41 p.m.
Message ID <differential-rev-PHID-DREV-td73eku4cny3byabsv3q-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/30265/
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.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/hgweb/webutil.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: 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
@@ -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