Mercurial > hg-stable
changeset 8063:ee8d9b93b316
convert/p4: win32 fixes
* cmd.exe does not know single quotes
* win32 does not like trailing whitespace very much. Trade test coverage for
maintenance time and drop the trailing whitespaces tests.
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Mon, 13 Apr 2009 16:15:45 +0200 |
parents | f4749d6fb433 |
children | 5c7bc1aece9e |
files | hgext/convert/p4.py tests/test-convert-p4 tests/test-convert-p4.out |
diffstat | 3 files changed, 9 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/convert/p4.py Mon Apr 13 21:18:53 2009 +0200 +++ b/hgext/convert/p4.py Mon Apr 13 16:15:45 2009 +0200 @@ -45,7 +45,7 @@ def _parse_view(self, path): "Read changes affecting the path" - cmd = "p4 -G changes -s submitted '%s'" % path + cmd = 'p4 -G changes -s submitted "%s"' % path stdout = util.popen(cmd) for d in loaditer(stdout): c = d.get("change", None) @@ -64,7 +64,7 @@ else: views = {"//": ""} else: - cmd = "p4 -G client -o '%s'" % path + cmd = 'p4 -G client -o "%s"' % path clientspec = marshal.load(util.popen(cmd)) views = {} @@ -139,7 +139,7 @@ return self.heads def getfile(self, name, rev): - cmd = "p4 -G print '%s#%s'" % (self.depotname[name], rev) + cmd = 'p4 -G print "%s#%s"' % (self.depotname[name], rev) stdout = util.popen(cmd) mode = None
--- a/tests/test-convert-p4 Mon Apr 13 21:18:53 2009 +0200 +++ b/tests/test-convert-p4 Mon Apr 13 16:15:45 2009 +0200 @@ -63,9 +63,9 @@ echo % interesting names echo dddd > "d d" -mkdir " e " -echo fff >" e /f " -p4 add "d d" " e /f " +mkdir " e" +echo fff >" e/ f" +p4 add "d d" " e/ f" p4 submit -d "add d e f" echo % convert again
--- a/tests/test-convert-p4.out Mon Apr 13 21:18:53 2009 +0200 +++ b/tests/test-convert-p4.out Mon Apr 13 16:15:45 2009 +0200 @@ -62,10 +62,10 @@ rev=0 desc="initial" tags="" files="a b/c" % interesting names //depot/test-mercurial-import/d d#1 - opened for add -//depot/test-mercurial-import/ e /f #1 - opened for add +//depot/test-mercurial-import/ e/ f#1 - opened for add Submitting change 5. Locking 2 files ... -add //depot/test-mercurial-import/ e /f #1 +add //depot/test-mercurial-import/ e/ f#1 add //depot/test-mercurial-import/d d#1 Change 5 submitted. % convert again @@ -80,7 +80,7 @@ sorting... converting... 0 add d e f -rev=4 desc="add d e f" tags="tip" files=" e /f d d" +rev=4 desc="add d e f" tags="tip" files=" e/ f d d" rev=3 desc="change a b/c" tags="" files="a b/c" rev=2 desc="change b/c" tags="" files="b/c" rev=1 desc="change a" tags="" files="a"