diff hgext/rebase.py @ 27146:88fde8db5307

rebase: propagate extra dict from rebase source changeset This corrects extra propagation for the rebase command and the shelve command.
author Mike Edgar <adgar@google.com>
date Sat, 28 Nov 2015 04:11:14 -0500
parents 405320cd6198
children 3fe8cb40c9c5
line wrap: on
line diff
--- a/hgext/rebase.py	Wed Nov 25 18:26:48 2015 +0100
+++ b/hgext/rebase.py	Sat Nov 28 04:11:14 2015 -0500
@@ -615,7 +615,10 @@
         if commitmsg is None:
             commitmsg = ctx.description()
         keepbranch = keepbranches and repo[p1].branch() != ctx.branch()
-        extra = {'rebase_source': ctx.hex()}
+        extra = ctx.extra().copy()
+        if not keepbranches:
+            del extra['branch']
+        extra['rebase_source'] = ctx.hex()
         if extrafn:
             extrafn(ctx, extra)