* vc-list-files: Remove mercurial support.
authorJim Meyering <jim@meyering.net>
Sat, 15 Sep 2007 06:39:53 +0000 (08:39 +0200)
committerJim Meyering <jim@meyering.net>
Sat, 15 Sep 2007 06:39:53 +0000 (08:39 +0200)
Check for CVS first.  Adjust comments.

build-aux/ChangeLog
build-aux/vc-list-files

index c18b1c2..37f70fe 100644 (file)
@@ -1,3 +1,8 @@
+2007-09-15  Jim Meyering  <jim@meyering.net>
+
+       * vc-list-files: Remove mercurial support.
+       Check for CVS first.  Adjust comments.
+
 2007-01-30  Jim Meyering  <jim@meyering.net>
 
        * vc-list-files: Select column 2, not 3 (hg-0.9.3's manifest format
index c6d3608..72a6f54 100755 (executable)
 # With no argument, list them all.
 # This script must be run solely from the top of a $srcdir build directory.
 
-# If there's an argument, it must be a single, "."-relative directory name,
-# with no trailing slashes.  In mercurial mode, it's used as part of a
-# "grep" pattern (prepend "^", append "/"), and in cvs mode, it's simply
-# used as an argument to the cvsu script.
+# If there's an argument, it must be a single, "."-relative directory name.
 # cvsu is part of the cvsutils package: http://www.red-bean.com/cvsutils/
 
-include_prefix=
+dir=
 case $# in
   0) ;;
-  1) include_prefix=$1 ;;
+  1) dir=$1 ;;
   *) echo "$0: too many arguments" 1>&2; exit 1 ;;
 esac
 
-if test -d .git; then
-  if test "x$include_prefix" = x; then
-    git-ls-files
-  else
-    git-ls-files | grep "^$include_prefix/"
-  fi
-elif test -d .hg; then
-  if test "x$include_prefix" = x; then
-    hg manifest | cut -d ' ' -f 2
+test "x$dir" = x && dir=.
+
+if test -d CVS; then
+  if test -x build-aux/cvsu; then
+    build-aux/cvsu --find --types=AFGM "$dir"
   else
-    hg manifest | cut -d ' ' -f 2 | grep "^$include_prefix/"
+    awk -F/ '{                         \
+       if (!$1 && $3 !~ /^-/) {        \
+         f=FILENAME;                   \
+         sub(/CVS\/Entries/, "", f);   \
+         print f $2;                   \
+       }}'                             \
+      $(find ${*-*} -name Entries -print) /dev/null;
   fi
-elif test -x build-aux/cvsu; then
-  build-aux/cvsu --find --types=AFGM $include_prefix
 else
-  awk -F/ '{                           \
-      if (!$1 && $3 !~ /^-/) {         \
-       f=FILENAME;                     \
-       sub(/CVS\/Entries/, "", f);     \
-       print f $2;                     \
-      }}'                              \
-    $(find ${*-*} -name Entries -print) /dev/null;
+  git-ls-files "$dir"
 fi