rebase: expand a long "one-liner"
When a one-liner gets 3 lines longs, it lose its expressivity benefits. We
expand it into a simple for loop. This makes future changes of the code in
that area clearer.
--- a/hgext/rebase.py Wed Sep 26 21:28:21 2018 +0200
+++ b/hgext/rebase.py Thu Sep 27 00:15:21 2018 +0200
@@ -1783,9 +1783,10 @@
hf = fm.hexfunc
fl = fm.formatlist
fd = fm.formatdict
- nodechanges = fd({hf(oldn): fl([hf(n) for n in newn], name='node')
- for oldn, newn in replacements.iteritems()},
- key="oldnode", value="newnodes")
+ changes = {}
+ for oldn, newn in replacements.iteritems():
+ changes[hf(oldn)] = fl([hf(n) for n in newn], name='node')
+ nodechanges = fd(changes, key="oldnode", value="newnodes")
fm.data(nodechanges=nodechanges)
def pullrebase(orig, ui, repo, *args, **opts):