rebase: use tuple as `replacement` keys
Now that `cleanupnodes` support tuples as key, we update the rebase code to use
them. No changes in the replacement tracked are introduced yet.
--- a/hgext/rebase.py Thu Sep 27 00:15:21 2018 +0200
+++ b/hgext/rebase.py Wed Sep 26 23:51:11 2018 +0200
@@ -1777,15 +1777,16 @@
else:
succs = (newnode,)
if succs is not None:
- replacements[oldnode] = succs
+ replacements[(oldnode,)] = succs
scmutil.cleanupnodes(repo, replacements, 'rebase', moves, backup=backup)
if fm:
hf = fm.hexfunc
fl = fm.formatlist
fd = fm.formatdict
changes = {}
- for oldn, newn in replacements.iteritems():
- changes[hf(oldn)] = fl([hf(n) for n in newn], name='node')
+ for oldns, newn in replacements.iteritems():
+ for oldn in oldns:
+ changes[hf(oldn)] = fl([hf(n) for n in newn], name='node')
nodechanges = fd(changes, key="oldnode", value="newnodes")
fm.data(nodechanges=nodechanges)