John W. Eaton wrote: > 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.
Can you investigate that? It'd be good to have a definitive answer. > Unfortunately, "hg status FILE" exits with a status of 0 > even when FILE does not exist. I'll look more carefully later. First, two details: please send patches in "git format-patch" format (if you're new to git/gnulib guidelines, see these http://git.sv.gnu.org/cgit/coreutils.git/plain/HACKING though note that in gnulib we do maintain a ChangeLog file) Also mentioned in HACKING is the issue of copyright assignment. Between these two tiny patches, you've reached the limit for someone with no assignment on file for gnulib. > 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 The others discard stderr. This should, too. > elif test -d .svn; then > svn log -r HEAD "$dir/$file" > /dev/null 2>&1 && found=yes > else