##// END OF EJS Templates
rebase: use fm.formatlist() and fm.formatdict() to support user template...
Pulkit Goyal -
r35123:f56a30b8 default
parent child Browse files
Show More
@@ -21,7 +21,6 b' import os'
21 21
22 22 from mercurial.i18n import _
23 23 from mercurial.node import (
24 hex,
25 24 nullid,
26 25 nullrev,
27 26 short,
@@ -1563,8 +1562,12 b' def clearrebased(ui, repo, destmap, stat'
1563 1562 replacements[oldnode] = succs
1564 1563 scmutil.cleanupnodes(repo, replacements, 'rebase', moves)
1565 1564 if fm:
1566 nodechanges = {hex(oldn): [hex(n) for n in newn]
1567 for oldn, newn in replacements.iteritems()}
1565 hf = fm.hexfunc
1566 fl = fm.formatlist
1567 fd = fm.formatdict
1568 nodechanges = fd({hf(oldn): fl([hf(n) for n in newn], name='node')
1569 for oldn, newn in replacements.iteritems()},
1570 key="oldnode", value="newnodes")
1568 1571 fm.data(nodechanges=nodechanges)
1569 1572
1570 1573 def pullrebase(orig, ui, repo, *args, **opts):
@@ -54,5 +54,4 b' Getting the JSON output for nodechanges'
54 54
55 55
56 56 $ hg rebase -s 6 -d 4 -q -T "{nodechanges % '{oldnode}:{newnodes % ' {node} '}'}"
57 d9d6773efc831c274eace04bc13e8e6412517139: f48cd65c6dc3d2acb55da54402a5b029546e546f (no-eol) (false !)
58 d9d6773efc831c274eace04bc13e8e6412517139 (no-eol)
57 d9d6773efc831c274eace04bc13e8e6412517139: f48cd65c6dc3d2acb55da54402a5b029546e546f (no-eol)
General Comments 0
You need to be logged in to leave comments. Login now