[PATCH 3 of 3 STABLE] test-check-config: convert directory separators to '/' for MSYS

Matt Harbison mharbison72 at gmail.com
Mon Jul 20 22:43:57 CDT 2015


# HG changeset patch
# User Matt Harbison <matt_harbison at yahoo.com>
# Date 1437449637 14400
#      Mon Jul 20 23:33:57 2015 -0400
# Branch stable
# Node ID 5435f069de649f3a38d2ccf78bc568e1264bf72d
# Parent  a4f9827b8e42fed2ff12e97e97307112b1b68fdf
test-check-config: convert directory separators to '/' for MSYS

The output of the files command uses native separator.  MSYS then seems to drop
the '\' on Windows when invoking python:

 --- c:/Users/Matt/Projects/hg/tests/test-check-config-hg.t
 +++ c:/Users/Matt/Projects/hg/tests/test-check-config-hg.t.err
 @@ -6,22 +6,10 @@

    $ hg files "set:(**.py or **.txt) - tests/**" |
    >   xargs python contrib/check-config.py  Traceback (most recent call last):
      File "contrib/check-config.py", line 93, in <module>
        sys.exit(main(sys.argv[1:]))
      File "contrib/check-config.py", line 24, in main
        for l in open(f):
    IOError: [Errno 2] No such file or directory: 'contriball-revsets.txt'
    [123]

diff --git a/tests/test-check-config-hg.t b/tests/test-check-config-hg.t
--- a/tests/test-check-config-hg.t
+++ b/tests/test-check-config-hg.t
@@ -4,7 +4,7 @@
 
 New errors are not allowed. Warnings are strongly discouraged.
 
-  $ hg files "set:(**.py or **.txt) - tests/**" |
+  $ hg files "set:(**.py or **.txt) - tests/**" | sed 's|\\|/|g' |
   >   xargs python contrib/check-config.py
   undocumented: convert.cvsps.cache (bool) [True]
   undocumented: convert.cvsps.fuzz (str) [60]


More information about the Mercurial-devel mailing list