D1293: rebase: use fm.formatlist() and fm.formatdict() to support user template
pulkit (Pulkit Goyal)
phabricator at mercurial-scm.org
Thu Nov 2 20:23:44 UTC 2017
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
Thanks to Yuya for suggesting this in https://phab.mercurial-scm.org/D1173.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D1293
AFFECTED FILES
hgext/rebase.py
CHANGE DETAILS
diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -21,7 +21,6 @@
from mercurial.i18n import _
from mercurial.node import (
- hex,
nullid,
nullrev,
short,
@@ -1545,8 +1544,11 @@
replacements[oldnode] = succs
scmutil.cleanupnodes(repo, replacements, 'rebase', moves)
if fm:
- nodechanges = {hex(oldn): [hex(n) for n in newn]
- for oldn, newn in replacements.iteritems()}
+ hf = fm.hexfunc
+ fl = fm.formatlist
+ fd = fm.formatdict
+ nodechanges = fd({hf(oldn): fl([hf(n) for n in newn], 'succs')
+ for oldn, newn in replacements.iteritems()})
fm.data(nodechanges=nodechanges)
def pullrebase(orig, ui, repo, *args, **opts):
To: pulkit, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list