Mercurial > hg
changeset 4832:0875082d5471
util._hgexecutable: default to 'hg'
This should make hooks work even if util.set_hgexecutable is not called
(e.g. hgweb.cgi).
Fixes issue625.
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Wed, 11 Jul 2007 18:15:21 -0300 |
parents | 6f08bc1bd00b |
children | fc8b3e7cbf6b |
files | mercurial/util.py |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/util.py Wed Jul 11 17:40:41 2007 -0300 +++ b/mercurial/util.py Wed Jul 11 18:15:21 2007 -0300 @@ -540,7 +540,7 @@ return (roots, match, (inc or exc or anypats) and True) -_hgexecutable = None +_hgexecutable = 'hg' def set_hgexecutable(path): """remember location of the 'hg' executable if easily possible @@ -549,7 +549,8 @@ fall back to 'hg' in this case. """ global _hgexecutable - _hgexecutable = path and os.path.abspath(path) or 'hg' + if path: + _hgexecutable = os.path.abspath(path) def system(cmd, environ={}, cwd=None, onerr=None, errprefix=None): '''enhanced shell command execution.