[PATCH RFC] util: set $HG var correctly for shell aliases (issue2867)

Mads Kiilerich mads at kiilerich.com
Wed Jun 29 10:08:19 CDT 2011


On 06/29/2011 04:42 PM, Idan Kamara wrote:
> # HG changeset patch
> # User Idan Kamara<idankk86 at gmail.com>
> # Date 1309358034 -10800
> # Branch stable
> # Node ID c64c8a0911544a924df2419882c39d447a2b630b
> # Parent  6ac6a32ac1605176befb7c4fdbe90ba952c59207
> util: set $HG var correctly for shell aliases (issue2867)
>
> The old version took the first 'hg' it found in $PATH, or simply the basename
> of sys.argv[0]. This is a problem if the 'hg' being used is not the first in
> $PATH. Also the use of basename on sys.argv[0] is inappropriate, because that
> effectively strips it to 'hg'.
>
> Instead we're always setting it to sys.argv[0].

Does that mean that the analysis in 
http://mercurial.selenic.com/bts/issue644 was wrong?

/Mads


More information about the Mercurial-devel mailing list