On Tue, Feb 17, 2009 at 09:08:33PM +0100, Joerg Sonnenberger wrote:
On Tue, Feb 17, 2009 at 07:52:13PM +0000, Jeremy Henty wrote:
Do you mean that we should worry that there might be an hg in $PATH that is not Mercurial? Is it really necessary to be that cautious?
It would be nice, yes. What about just wrapping this into if [ -d .hg ]; ... fi or something like that?
I'm completely convinced that this really adds any safety, but it's easy enough to do. Revised patch attached. BTW: the autoconf documentation frowns on this sort of thing, from (autoconf.info)Limitations of Builtins: `test' (files) To enable `configure' scripts to support cross-compilation, they shouldn't do anything that tests features of the build system instead of the host system. So I guess if we want to be truly GNU-ly correct we should disable this code unless the builder specifies some enable-* configure flag. However, the code won't break any cross-compilation so it's not critical. Regards, Jeremy Henty