Patchwork [2,of,5,STABLE,emergency-fix] graft: don't preserve most extra fields

login
register
mail settings
Submitter Siddharth Agarwal
Date Feb. 3, 2016, 5:26 p.m.
Message ID <cc1e65b477a4eda2fac8.1454520368@dev666.prn1.facebook.com>
Download mbox | patch
Permalink /patch/12955/
State Accepted
Headers show

Comments

Siddharth Agarwal - Feb. 3, 2016, 5:26 p.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1454519212 28800
#      Wed Feb 03 09:06:52 2016 -0800
# Branch stable
# Node ID cc1e65b477a4eda2fac86cc7683794b7f5fd0de2
# Parent  cbaa30443fd7280b212ad887e19af57bfaed6649
# Available At http://42.netv6.net/sid0-wip/hg/
#              hg pull http://42.netv6.net/sid0-wip/hg/ -r cc1e65b477a4
graft: don't preserve most extra fields

This backs out changeset 804abe8999f3.

See the previous patch for why we're doing this.

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -4010,10 +4010,10 @@  def _dograft(ui, repo, *revs, **opts):
         if opts.get('dry_run'):
             continue
 
-        extra = ctx.extra().copy()
-        del extra['branch']
-        source = extra.get('source')
+        source = ctx.extra().get('source')
+        extra = {}
         if source:
+            extra['source'] = source
             extra['intermediate-source'] = ctx.hex()
         else:
             extra['source'] = ctx.hex()
diff --git a/tests/test-rebase-obsolete.t b/tests/test-rebase-obsolete.t
--- a/tests/test-rebase-obsolete.t
+++ b/tests/test-rebase-obsolete.t
@@ -253,9 +253,9 @@  More complex case were part of the rebas
   grafting 11:4596109a6a43 "D"
   $ hg up -qr 'desc(E)'
   $ hg rebase -s tip -d .
-  rebasing 14:0f4c66d0b70f "D" (tip)
+  rebasing 14:9e36056a46e3 "D" (tip)
   $ hg log --style default --debug -r tip
-  changeset:   15:884f358981b4d32069bb539e0e95d49a35eb81d0
+  changeset:   15:627d4614809036ba22b9e7cb31638ddc06ab99ab
   tag:         tip
   phase:       draft
   parent:      4:9520eea781bcca16c1e15acc0ba14335a0e8e5ba
@@ -266,7 +266,7 @@  More complex case were part of the rebas
   files+:      D
   extra:       branch=default
   extra:       intermediate-source=4596109a6a4328c398bde3a4a3b6737cfade3003
-  extra:       rebase_source=0f4c66d0b70f8e1ce4aec01f8e95cf24ee923afa
+  extra:       rebase_source=9e36056a46e37c9776168c7375734eebc70e294f
   extra:       source=32af7686d403cf45b5d95f2d70cebea587ac806a
   description:
   D