[PATCH] splicemap: support for path with spaces in splicemap (issue3844)

Szymon Wróblewski bluex0 at gmail.com
Mon Apr 29 13:46:59 CDT 2013


# HG changeset patch
# User Szymon Wroblewski <bluex0 at gmail.com>
# Date 1367260981 -7200
# Branch stable
# Node ID 79f31e640403180f928edf5d183e6dd7e62878b5
# Parent  f01a351db79106ba96ac6d527cf69944fd98e665
splicemap: support for path with spaces in splicemap (issue3844)

Probably the easiest way to support path with spaces, without need to use any
kind of escaping or encoding. This way however makes syntax strictly consistent
with documentation (previously it was possible to use whitespaces as path
separators).

diff -r f01a351db791 -r 79f31e640403 hgext/convert/common.py
--- a/hgext/convert/common.py Fri Apr 26 01:12:03 2013 +0900
+++ b/hgext/convert/common.py Mon Apr 29 20:43:01 2013 +0200
@@ -438,12 +438,13 @@
                 continue
             try:
                 child, parents = line.split(' ', 1)
-                parents = parents.replace(',', ' ').split()
+                parents = parents.split(',')
             except ValueError:
                 raise util.Abort(_('syntax error in %s(%d): child parent1'
                                    '[,parent2] expected') % (path, i + 1))
             pp = []
             for p in parents:
+                p = p.strip()
                 if p not in pp:
                     pp.append(p)
             m[child] = pp


More information about the Mercurial-devel mailing list