[PATCH 2 of 2 stable] convert: fix Python syntax in 'splice in' message

Mads Kiilerich mads at kiilerich.com
Mon Oct 19 09:51:01 CDT 2015


# HG changeset patch
# User Mads Kiilerich <madski at unity3d.com>
# Date 1445266194 -7200
#      Mon Oct 19 16:49:54 2015 +0200
# Node ID cf479bd58e881416dc01fc391846f21fd0bf2824
# Parent  7fa7cc10f51a6165f50539d49eb9b479370cb6c2
convert: fix Python syntax in 'splice in' message

Instead of reporting
  spliced in ['82544090e14fe18091e04f1fb0f0d7991cbe6e7e'] as parents of 369fd983d9e13330e9f12d9fce820deae84ea223
report
  spliced in 82544090e14fe18091e04f1fb0f0d7991cbe6e7e as parents of 369fd983d9e13330e9f12d9fce820deae84ea223

diff --git a/hgext/convert/convcmd.py b/hgext/convert/convcmd.py
--- a/hgext/convert/convcmd.py
+++ b/hgext/convert/convcmd.py
@@ -440,7 +440,7 @@ class converter(object):
         try:
             parents = self.splicemap[rev]
             self.ui.status(_('spliced in %s as parents of %s\n') %
-                           (parents, rev))
+                           (_(' and ').join(parents), rev))
             parents = [self.map.get(p, p) for p in parents]
         except KeyError:
             parents = [b[0] for b in pbranches]
diff --git a/tests/test-convert-splicemap.t b/tests/test-convert-splicemap.t
--- a/tests/test-convert-splicemap.t
+++ b/tests/test-convert-splicemap.t
@@ -100,9 +100,9 @@ splice repo2 on repo1
   sorting...
   converting...
   2 addaandd
-  spliced in ['6d4c2037ddc2cb2627ac3a244ecce35283268f8e'] as parents of 527cdedf31fbd5ea708aa14eeecf53d4676f38db
+  spliced in 6d4c2037ddc2cb2627ac3a244ecce35283268f8e as parents of 527cdedf31fbd5ea708aa14eeecf53d4676f38db
   1 changed
-  spliced in ['e55c719b85b60e5102fac26110ba626e7cb6b7dc', '527cdedf31fbd5ea708aa14eeecf53d4676f38db'] as parents of e4ea00df91897da3079a10fab658c1eddba6617b
+  spliced in e55c719b85b60e5102fac26110ba626e7cb6b7dc and 527cdedf31fbd5ea708aa14eeecf53d4676f38db as parents of e4ea00df91897da3079a10fab658c1eddba6617b
   0 adde
   $ glog -R target1
   o  5:16bc847b02aa "adde" files: e
@@ -161,7 +161,7 @@ Test regular conversion
   2 changea
   1 addb
   0 changeaagain
-  spliced in ['717d54d67e6c31fd75ffef2ff3042bdd98418437', '102a90ea7b4a3361e4082ed620918c261189a36a'] as parents of 7c364e7fa7d70ae525610c016317ed717b519d97
+  spliced in 717d54d67e6c31fd75ffef2ff3042bdd98418437 and 102a90ea7b4a3361e4082ed620918c261189a36a as parents of 7c364e7fa7d70ae525610c016317ed717b519d97
   $ glog -R ordered-hg1
   o    3:4cb04b9afbf2 "changeaagain" files: a
   |\
@@ -199,7 +199,7 @@ and destination identifiers. Test unknow
   sorting...
   converting...
   0 changeaagain
-  spliced in ['717d54d67e6c31fd75ffef2ff3042bdd98418437', '102a90ea7b4a3361e4082ed620918c261189a36a'] as parents of 7c364e7fa7d70ae525610c016317ed717b519d97
+  spliced in 717d54d67e6c31fd75ffef2ff3042bdd98418437 and 102a90ea7b4a3361e4082ed620918c261189a36a as parents of 7c364e7fa7d70ae525610c016317ed717b519d97
   $ glog -R ordered-hg2
   o    3:4cb04b9afbf2 "changeaagain" files: a
   |\


More information about the Mercurial-devel mailing list