Patchwork D3074: hgweb: inline changeidctx()

login
register
mail settings
Submitter phabricator
Date April 4, 2018, 6:25 p.m.
Message ID <35b98210d4b278a867e96afceb08cfcf@localhost.localdomain>
Download mbox | patch
Permalink /patch/30272/
State Not Applicable
Headers show

Comments

phabricator - April 4, 2018, 6:25 p.m.
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




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