[PATCH] move system from util to scmutil

Adrian Buehlmann adrian at cadifra.com
Fri Apr 22 15:08:14 CDT 2011


On 2011-04-22 21:06, Matt Mackall wrote:
> On Fri, 2011-04-22 at 11:29 +0200, Adrian Buehlmann wrote:
>> # HG changeset patch
>> # User Adrian Buehlmann <adrian at cadifra.com>
>> # Date 1303453071 -7200
>> # Node ID 5e8843698a38717196f144079fa3f2c95de01ce0
>> # Parent  e0f07847f8de2a349ce6f17b36cb6beb64da704d
>> move system from util to scmutil
> 
> Not sure about this one. I've always thought it was a bit unfortunate
> that system has that HG hack, not sure I want to take it further in that
> direction.
> 

Ok. Then hgexecutable and set_hgexecutable have to stay in util as well:

def hgexecutable():
    """return location of the 'hg' executable.

    Defaults to $HG or 'hg' in the search path.
    """
    if _hgexecutable is None:
        hg = os.environ.get('HG')
        if hg:
            set_hgexecutable(hg)
        elif main_is_frozen():
            set_hgexecutable(sys.executable)
        else:
            exe = find_exe('hg') or os.path.basename(sys.argv[0])
            set_hgexecutable(exe)
    return _hgexecutable

So these are the remaining exceptions to your rules then.




More information about the Mercurial-devel mailing list