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

Matt Mackall mpm at selenic.com
Fri Jun 29 13:43:17 CDT 2012


On Fri, 2012-06-29 at 20:08 +0200, Adrian Buehlmann wrote:
> On 2012-06-29 15:55, Mads Kiilerich wrote:
> > My conclusion:
> > 
> > Anything /etc/profile can do ~/.profile can do better - but it will not 
> > be used by the test scripts anyway.
> 
> Indeed.
> 
> As an experiment, I inserted
> 
>   alias hg=foo.exe
> 
> into /etc/profile

You've encountered the classic "what startup file does bash read when"
confusion. We quite regularly see this as "I can ssh and run hg, but hg
push ssh://... doesn't work".

 https://encrypted.google.com/search?q=profile+bashrc

Simplified, there are basically three modes you can run bash in:

- login shell: reads .profile and related
- "interactive" non-login shell: reads .bashrc and related
- shell script: reads neither (unless you use ENV/BASH_ENV magic)

There's valid historical reasons for this weirdness, of course. But
today, most people make the files equivalent by sourcing one into the
other.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list