[PATCH] convert: update 'intermediate-source' in the destination's extras dictionary

Matt Harbison mharbison at attotech.com
Mon Jun 15 16:33:19 CDT 2015


# HG changeset patch
# User Matt Harbison <matt_harbison at yahoo.com>
# Date 1434401431 14400
#      Mon Jun 15 16:50:31 2015 -0400
# Node ID 647722c07d4e20d17a4a3f7290d844238a9d1060
# Parent  1b26ea0a5bb82501fafcf7aa334fe079250988e6
convert: update 'intermediate-source' in the destination's extras dictionary

diff --git a/hgext/convert/hg.py b/hgext/convert/hg.py
--- a/hgext/convert/hg.py
+++ b/hgext/convert/hg.py
@@ -225,7 +225,8 @@ class mercurial_sink(converter_sink):
 
         extra = commit.extra.copy()
 
-        for label in ('source', 'transplant_source', 'rebase_source'):
+        for label in ('source', 'transplant_source', 'rebase_source',
+                      'intermediate-source'):
             node = extra.get(label)
 
             if node is None:
diff --git a/tests/test-graft.t b/tests/test-graft.t
--- a/tests/test-graft.t
+++ b/tests/test-graft.t
@@ -492,10 +492,12 @@ The graft case
   date:        Thu Jan 01 00:00:00 1970 +0000
   summary:     2
   
-Test that template correctly expands more than one 'extra' (issue4362)
-  $ hg -R ../converted log -r 7 --template "{extras % ' Extra: {extra}\n'}"
+Test that template correctly expands more than one 'extra' (issue4362), and that
+'intermediate-source' is converted.
+  $ hg -R ../converted log -r 13 --template "{extras % ' Extra: {extra}\n'}"
    Extra: branch=default
-   Extra: convert_revision=ef0ef43d49e79e81ddafdc7997401ba0041efc82
+   Extra: convert_revision=7a4785234d87ec1aa420ed6b11afe40fa73e12a9
+   Extra: intermediate-source=7ae846e9111fc8f57745634250c7b9ac0a60689b
    Extra: source=e0213322b2c1a5d5d236c74e79666441bee67a7d
 
 The transplant case


More information about the Mercurial-devel mailing list