Mercurial > hg
changeset 37334:6407507e12b6
hgweb: inline changeidctx()
Differential Revision: https://phab.mercurial-scm.org/D3074
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 03 Apr 2018 23:00:41 -0700 |
parents | 44f3b60deafb |
children | 956260cbc564 |
files | mercurial/hgweb/webutil.py |
diffstat | 1 files changed, 2 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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