diff hgext/rebase.py @ 19861:a69a77a80900

rebase: preserve metadata from grafts of changes (issue4001)
author Augie Fackler <raf@durin42.com>
date Tue, 01 Oct 2013 14:48:53 -0400
parents 6cd9b8428104
children 9c78ed396075
line wrap: on
line diff
--- a/hgext/rebase.py	Tue Oct 01 14:28:18 2013 -0400
+++ b/hgext/rebase.py	Tue Oct 01 14:48:53 2013 -0400
@@ -29,6 +29,11 @@
 command = cmdutil.command(cmdtable)
 testedwith = 'internal'
 
+def _savegraft(ctx, extra):
+    s = ctx.extra().get('source', None)
+    if s is not None:
+        extra['source'] = s
+
 def _savebranch(ctx, extra):
     extra['branch'] = ctx.branch()
 
@@ -151,7 +156,7 @@
         collapsef = opts.get('collapse', False)
         collapsemsg = cmdutil.logmessage(ui, opts)
         e = opts.get('extrafn') # internal, used by e.g. hgsubversion
-        extrafns = []
+        extrafns = [_savegraft]
         if e:
             extrafns = [e]
         keepf = opts.get('keep', False)