##// END OF EJS Templates
formatter: make 'originalnode' a thing in log-like templates...
Yuya Nishihara -
r37123:e7bc0667 default
parent child Browse files
Show More
@@ -514,8 +514,10 b' class templateresources(templater.resour'
514 514 mapping = {}
515 515 if self._hasctx(newmapping):
516 516 mapping['revcache'] = {} # per-ctx cache
517 if 'node' in origmapping and 'node' in newmapping:
518 mapping['originalnode'] = origmapping['node']
517 if (('node' in origmapping or self._hasctx(origmapping))
518 and ('node' in newmapping or self._hasctx(newmapping))):
519 orignode = templateutil.runsymbol(context, origmapping, 'node')
520 mapping['originalnode'] = orignode
519 521 return mapping
520 522
521 523 def _getsome(self, context, mapping, key):
@@ -4199,6 +4199,13 b' Invalid arguments passed to revset()'
4199 4199 hg: parse error: invalid argument for revspec
4200 4200 [255]
4201 4201
4202 Test 'originalnode'
4203
4204 $ hg log -r 1 -T '{revset("null") % "{node|short} {originalnode|short}"}\n'
4205 000000000000 bcc7ff960b8e
4206 $ hg log -r 0 -T '{manifest % "{node} {originalnode}"}\n'
4207 a0c8bcbbb45c63b90b70ad007bf38961f64f2af0 f7769ec2ab975ad19684098ad1ffd9b81ecc71a1
4208
4202 4209 Test files function
4203 4210
4204 4211 $ hg log -T "{rev}\n{join(files('*'), '\n')}\n"
General Comments 0
You need to be logged in to leave comments. Login now