##// END OF EJS Templates
hgweb: use revsymbol() for creating context from changeid...
Martin von Zweigbergk -
r37351:956260cb default
parent child Browse files
Show More
@@ -32,6 +32,7 b' from .. import ('
32 patch,
32 patch,
33 pathutil,
33 pathutil,
34 pycompat,
34 pycompat,
35 scmutil,
35 templatefilters,
36 templatefilters,
36 templatekw,
37 templatekw,
37 ui as uimod,
38 ui as uimod,
@@ -303,7 +304,7 b' def changectx(repo, req):'
303 if ipos != -1:
304 if ipos != -1:
304 changeid = changeid[(ipos + 1):]
305 changeid = changeid[(ipos + 1):]
305
306
306 return repo[changeid]
307 return scmutil.revsymbol(repo, changeid)
307
308
308 def basechangectx(repo, req):
309 def basechangectx(repo, req):
309 if 'node' in req.qsparams:
310 if 'node' in req.qsparams:
@@ -311,7 +312,7 b' def basechangectx(repo, req):'
311 ipos = changeid.find(':')
312 ipos = changeid.find(':')
312 if ipos != -1:
313 if ipos != -1:
313 changeid = changeid[:ipos]
314 changeid = changeid[:ipos]
314 return repo[changeid]
315 return scmutil.revsymbol(repo, changeid)
315
316
316 return None
317 return None
317
318
@@ -326,7 +327,7 b' def filectx(repo, req):'
326 else:
327 else:
327 raise ErrorResponse(HTTP_NOT_FOUND, 'node or filenode not given')
328 raise ErrorResponse(HTTP_NOT_FOUND, 'node or filenode not given')
328 try:
329 try:
329 fctx = repo[changeid][path]
330 fctx = scmutil.revsymbol(repo, changeid)[path]
330 except error.RepoError:
331 except error.RepoError:
331 fctx = repo.filectx(path, fileid=changeid)
332 fctx = repo.filectx(path, fileid=changeid)
332
333
General Comments 0
You need to be logged in to leave comments. Login now