[PATCH] run-tests: alias hg to hg.exe for Windows

Mads Kiilerich mads at kiilerich.com
Fri Jun 29 08:55:07 CDT 2012


On 29/06/12 14:10, Adrian Buehlmann wrote:
> On 2012-06-28 23:44, Mads Kiilerich wrote:
>> We could recommend msys users to add the alias to their 'local' bash
>> configuration if they want to hit 'hg.exe' from the bash command line too.
> Except that there is no such thing on a default MSYS install as a local bash
> configuration.

On MSYS, some preparation:

> $ echo 'echo ~/.profile' >> ~/.profile
> $ echo 'echo ~/.bash_profile' >> ~/.bash_profile
> $ echo 'echo ~/.bashrc' >> ~/.bashrc
> $ echo 'echo /etc/profile' >> /etc/profile

When I start a new rxvt window I see

> /etc/profile
> /home/admin01/.profile

Some other experiments:

> $ sh
>
> $ sh -l
> /etc/profile
> /home/admin01/.profile
>
> $ bash
> /home/admin01/.bashrc
>
> $ bash -l
> /etc/profile
> /home/admin01/.bash_profile
>
> $ rm ~/.bash_profile
>
> $ bash -l
> /etc/profile
> /home/admin01/.profile
>
> $ sh -c 'echo hey'
> hey
>
> $ bash -c 'echo hey'
> hey

My conclusion:

Anything /etc/profile can do ~/.profile can do better - but it will not 
be used by the test scripts anyway.

> You'd have to edit
>
>    C:\MinGW\msys\1.0\etc\profile
>
> To include something like
>
>    . $HOME/.bashrc
>

IMO that sourcing should at most be done in the users ~/.bash_profile . 
YMMV.

/Mads


More information about the Mercurial-devel mailing list