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

Matt Harbison mharbison72 at gmail.com
Tue Jul 21 18:40:06 CDT 2015


On Tue, 21 Jul 2015 17:55:00 -0400, Augie Fackler <raf at durin42.com> wrote:

> On Tue, Jul 21, 2015 at 10:37:24AM -0700, Sean Farley wrote:
>>
>> Matt Harbison <mharbison72 at gmail.com> writes:
>>
>> > # 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]
>>
>> The series looks fine to me but maybe instead of check-code we just
>> automatically glob path separators in run-test.py?
>
> I think there are some path separators we want to assert are always /,
> rather than / or \, so we probably don't want to do that.
>
> (I have only a foggy recollection of this, and it may be wrong. If we
> can confirm this, we may want to document it somehow.)

I'm not clear on what Sean means, so this may be tangential.

The problem with (glob) currently is that if it is not needed and present,  
or needed and absent, the test on Windows yields a '~'.  (It used to be  
that it spit out what line had the problem so it was easy to fix.)  So I'm  
not sure that there is a generic solution.


More information about the Mercurial-devel mailing list