Micah Cowan <[EMAIL PROTECTED]> added the comment:

Vincent Danjean wrote:
>   This is the Debian bug #447094 ( http://bugs.debian.org/447094 )
> The short story is that 'type' is not allowed (by POSIX) in
> #!/bin/sh scripts (in particular hgmerge)

It's a bit misleading to claim that it is "not allowed" by POSIX; it's
not a violation of POSIX. It'd be more accurate to say that it's an
extension to POSIX.

However, since it _is_ specified by SUS, it seems pretty reasonable to
expect it to be portable.

>   In the debian package, I change hgmerge to be a #!/bin/bash script.
>   I would like to know if upstream will do the same thing or if this
> change will remain specific to Debian.

Causing Mercurial to rely upon bash rather than portable sh seems like
the wrong direction to take this, especially since it's hardly specific
to bash. It's fine for Debian, where you know bash is available; it's
less fine in general. Switching to use "command -v" instead might work,
but you're still talking about an extension over POSIX (this time, for
POSIX systems exercising the User Portability Utilities option).
However, it's probably more portable than type (at least its output
format is dictated by POSIX). In any case, POSIX doesn't provide any
alternatives that are guaranteed to exist, so I don't see how using a
purely POSIX (with no extensions) sh script is possible.

----------
nosy: +micah
status: unread -> chatting

____________________________________________________
Mercurial issue tracker <[EMAIL PROTECTED]>
<http://www.selenic.com/mercurial/bts/issue815>
____________________________________________________


Reply via email to