Path fun on Windows

Adrian Buehlmann adrian at cadifra.com
Wed Jun 6 07:26:52 CDT 2012


On 2012-06-06 13:49, Mads Kiilerich wrote:
> On 06/06/12 11:54, Adrian Buehlmann wrote:
>> run-tests.py does:
>>
>> 617    if os.getenv('MSYSTEM'):
>> 618        script.append('alias pwd="pwd -W"\n')
>>
>> So, it prepends a clever alias at the cooked skript, which makes sure that
>> "pwd" inside a script is in fact "pwd -W".
> 
> That hack was a quick way to get something up and running with msys. It 
> is possible that there are better ways to do it - especially now when we 
> understand msys path mangling better.

The hack is pretty good. I'm currently leaning towards keeping it in
place, so it deliberately shoots us in the back at various places.

I think it might be better to learn living under that shooting and
harden mercurial against that kind of problem.

Also, I think we do want to be exposed to real Windows paths when
testing on Windows - depending on the virtual, made-up unix-path crotch
provided by MSYS won't help us much. Other than making us dependent on
that crotch.

Also, I fear we would then be exposed to the totally artificial MSYS
paths like

  /c/Users/adi

etc., which might confuse mercurial a whole lot, as such paths are
clearly not expected on a system where os.name == 'nt'.






More information about the Mercurial-devel mailing list