diff options
-rw-r--r-- | build-aux/ChangeLog | 5 | ||||
-rwxr-xr-x | build-aux/vc-list-files | 41 |
2 files changed, 21 insertions, 25 deletions
diff --git a/build-aux/ChangeLog b/build-aux/ChangeLog index c18b1c26c..37f70fede 100644 --- a/build-aux/ChangeLog +++ b/build-aux/ChangeLog @@ -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 diff --git a/build-aux/vc-list-files b/build-aux/vc-list-files index c6d360822..72a6f549c 100755 --- a/build-aux/vc-list-files +++ b/build-aux/vc-list-files @@ -21,39 +21,30 @@ # 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 |