Patchwork splicemap: support for path with spaces in splicemap (issue3844)

login
register
mail settings
Submitter Szymon Wróblewski
Date April 29, 2013, 6:46 p.m.
Message ID <CAF-_pHip_bmDm6RBkrQFb62zdcODa+SBA2ggdcLM3uwzLRH7Sw@mail.gmail.com>
Download mbox | patch
Permalink /patch/1501/
State Changes Requested
Headers show

Comments

Szymon Wróblewski - April 29, 2013, 6:46 p.m.
# HG changeset patch
# User Szymon Wroblewski <bluex0@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).

Patch

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