D3075: hgweb: use revsymbol() for creating context from changeid
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Wed Apr 4 14:25:58 EDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG956260cbc564: hgweb: use revsymbol() for creating context from changeid (authored by martinvonz, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D3075?vs=7624&id=7631
REVISION DETAIL
https://phab.mercurial-scm.org/D3075
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
@@ -32,6 +32,7 @@
patch,
pathutil,
pycompat,
+ scmutil,
templatefilters,
templatekw,
ui as uimod,
@@ -303,15 +304,15 @@
if ipos != -1:
changeid = changeid[(ipos + 1):]
- return repo[changeid]
+ return scmutil.revsymbol(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 repo[changeid]
+ return scmutil.revsymbol(repo, changeid)
return None
@@ -326,7 +327,7 @@
else:
raise ErrorResponse(HTTP_NOT_FOUND, 'node or filenode not given')
try:
- fctx = repo[changeid][path]
+ fctx = scmutil.revsymbol(repo, changeid)[path]
except error.RepoError:
fctx = repo.filectx(path, fileid=changeid)
To: martinvonz, #hg-reviewers, durin42
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list