# HG changeset patch # User Yuya Nishihara # Date 2015-12-05 14:48:22 # Node ID d755a9531fce0e3a9d9f76699b995309cb3ca6c5 # Parent 290b41913d9f376d5f1203aec0ed176daf597f6b rebase: drop redundant functions to keep branch and graft source explicitly All entries in extra dict are propagated by default since 88fde8db5307. diff --git a/hgext/rebase.py b/hgext/rebase.py --- a/hgext/rebase.py +++ b/hgext/rebase.py @@ -47,17 +47,6 @@ testedwith = 'internal' 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 @@ def rebase(ui, repo, **opts): 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 @@ def rebase(ui, repo, **opts): 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: