[PATCH 4 of 5 STABLE emergency-fix] rebase: backout changeset d755a9531fce
Siddharth Agarwal
sid0 at fb.com
Wed Feb 3 17:26:10 UTC 2016
# HG changeset patch
# User Siddharth Agarwal <sid0 at fb.com>
# Date 1454520287 28800
# Wed Feb 03 09:24:47 2016 -0800
# Branch stable
# Node ID 99cd5792da23bb1d268451a5d110c8e0480d0442
# Parent e12fa0d903decb99d91abef3162fcb3bcf7747e7
# Available At http://42.netv6.net/sid0-wip/hg/
# hg pull http://42.netv6.net/sid0-wip/hg/ -r 99cd5792da23
rebase: backout changeset d755a9531fce
This is a dependency for a future backout of 88fde8db5307.
See the previous patches for why.
diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -47,6 +47,17 @@ 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.
@@ -208,7 +219,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 = []
+ extrafns = [_savegraft]
if e:
extrafns = [e]
keepf = opts.get('keep', False)
@@ -398,6 +409,10 @@ 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:
More information about the Mercurial-devel
mailing list