Would the following patch be OK for recognizing Mercurial in the build-aux/bootstrap script? It seems to work for me. Maybe there is a better way of recognizing that a file is tracked, but I'm not sure what it is. Unfortunately, "hg status FILE" exits with a status of 0 even when FILE does not exist.
jwe
commit 17efaa64f21d1834ab75904bc423a77b098c670d Author: John W. Eaton <j...@gnu.org> Date: Sat Nov 14 02:26:15 2009 -0500 build-aux/bootstrap: Recognize Mercurial for version control. diff --git a/build-aux/bootstrap b/build-aux/bootstrap index 8ac13b2..799ad68 100755 --- a/build-aux/bootstrap +++ b/build-aux/bootstrap @@ -146,7 +146,7 @@ checkout_only_file=README-hacking # Whether to use copies instead of symlinks. copy=false -# Set this to '.cvsignore .gitignore' in bootstrap.conf if you want +# Set this to '.cvsignore .gitignore .hgignore' in bootstrap.conf if you want # those files to be generated in directories like lib/, m4/, and po/. # Or set it to 'auto' to make this script select which to use based # on which version control system (if any) is used in the source directory. @@ -203,6 +203,7 @@ esac if test "$vc_ignore" = auto; then vc_ignore= test -d .git && vc_ignore=.gitignore + test -d .hg && vc_ignore="$vc_ignore .hgignore" test -d CVS && vc_ignore="$vc_ignore .cvsignore" fi @@ -605,6 +606,8 @@ version_controlled_file() { grep '^/[^/]*/[0-9]' > /dev/null && found=yes elif test -d .git; then git rm -n "$dir/$file" > /dev/null 2>&1 && found=yes + elif test -d .hg; then + test -n `hg log -l 1 "$dir/$file"` && found=yes elif test -d .svn; then svn log -r HEAD "$dir/$file" > /dev/null 2>&1 && found=yes else