changeset 27260:d755a9531fce

rebase: drop redundant functions to keep branch and graft source explicitly All entries in extra dict are propagated by default since 88fde8db5307.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 05 Dec 2015 23:48:22 +0900
parents 290b41913d9f
children 986d04b9fedd
files hgext/rebase.py
diffstat 1 files changed, 1 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/rebase.py	Sat Dec 05 23:41:11 2015 +0900
+++ b/hgext/rebase.py	Sat Dec 05 23:48:22 2015 +0900
@@ -47,17 +47,6 @@
 def _nothingtorebase():
     return 1
 
-def _savegraft(ctx, extra):
-    s = ctx.extra().get('source', None)
-    if s is not None:
-        extra['source'] = s
-    s = ctx.extra().get('intermediate-source', None)
-    if s is not None:
-        extra['intermediate-source'] = s
-
-def _savebranch(ctx, extra):
-    extra['branch'] = ctx.branch()
-
 def _makeextrafn(copiers):
     """make an extrafn out of the given copy-functions.
 
@@ -228,7 +217,7 @@
         collapsemsg = cmdutil.logmessage(ui, opts)
         date = opts.get('date', None)
         e = opts.get('extrafn') # internal, used by e.g. hgsubversion
-        extrafns = [_savegraft]
+        extrafns = []
         if e:
             extrafns = [e]
         keepf = opts.get('keep', False)
@@ -398,10 +387,6 @@
                 ui.status(_('reopening closed branch head %s\n') % dest)
 
         if keepbranchesf:
-            # insert _savebranch at the start of extrafns so if
-            # there's a user-provided extrafn it can clobber branch if
-            # desired
-            extrafns.insert(0, _savebranch)
             if collapsef:
                 branches = set()
                 for rev in state: