##// 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 from mercurial.i18n import _
22 from mercurial.i18n import _
23 from mercurial.node import (
23 from mercurial.node import (
24 hex,
25 nullid,
24 nullid,
26 nullrev,
25 nullrev,
27 short,
26 short,
@@ -1563,8 +1562,12 b' def clearrebased(ui, repo, destmap, stat'
1563 replacements[oldnode] = succs
1562 replacements[oldnode] = succs
1564 scmutil.cleanupnodes(repo, replacements, 'rebase', moves)
1563 scmutil.cleanupnodes(repo, replacements, 'rebase', moves)
1565 if fm:
1564 if fm:
1566 nodechanges = {hex(oldn): [hex(n) for n in newn]
1565 hf = fm.hexfunc
1567 for oldn, newn in replacements.iteritems()}
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 fm.data(nodechanges=nodechanges)
1571 fm.data(nodechanges=nodechanges)
1569
1572
1570 def pullrebase(orig, ui, repo, *args, **opts):
1573 def pullrebase(orig, ui, repo, *args, **opts):
@@ -54,5 +54,4 b' Getting the JSON output for nodechanges'
54
54
55
55
56 $ hg rebase -s 6 -d 4 -q -T "{nodechanges % '{oldnode}:{newnodes % ' {node} '}'}"
56 $ hg rebase -s 6 -d 4 -q -T "{nodechanges % '{oldnode}:{newnodes % ' {node} '}'}"
57 d9d6773efc831c274eace04bc13e8e6412517139: f48cd65c6dc3d2acb55da54402a5b029546e546f (no-eol) (false !)
57 d9d6773efc831c274eace04bc13e8e6412517139: f48cd65c6dc3d2acb55da54402a5b029546e546f (no-eol)
58 d9d6773efc831c274eace04bc13e8e6412517139 (no-eol)
General Comments 0
You need to be logged in to leave comments. Login now