comparison mercurial/util.py @ 6500:a3175cd7dbec

Tidy code, fix typo
author Bryan O'Sullivan <bos@serpentine.com>
date Wed, 09 Apr 2008 15:27:57 -0700
parents 479847ccabe0
children 4f7feeb6d6ee
comparison
equal deleted inserted replaced
6499:479847ccabe0 6500:a3175cd7dbec
567 """return location of the 'hg' executable. 567 """return location of the 'hg' executable.
568 568
569 Defaults to $HG or 'hg' in the search path. 569 Defaults to $HG or 'hg' in the search path.
570 """ 570 """
571 if _hgexecutable is None: 571 if _hgexecutable is None:
572 if os.environ.has_key('HG'): 572 hg = os.environ.get('HG')
573 set_hgexecutable(os.environ.get('HG')) 573 if hg:
574 set_hgexecutable(hg)
574 elif main_is_frozen(): 575 elif main_is_frozen():
575 set_hgexecutable(sys.executable) 576 set_hgexecutable(sys.executable)
576 else: 577 else:
577 sel_hgexecutable(find_exe('hg', 'hg')) 578 set_hgexecutable(find_exe('hg', 'hg'))
578 return _hgexecutable 579 return _hgexecutable
579 580
580 def set_hgexecutable(path): 581 def set_hgexecutable(path):
581 """set location of the 'hg' executable""" 582 """set location of the 'hg' executable"""
582 global _hgexecutable 583 global _hgexecutable