[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt PATCH 3/8] build-aux: vc-list-files: remove non-git support



On Fri, Aug 28, 2020 at 08:34:48AM +0200, Erik Skultety wrote:
> On Thu, Aug 27, 2020 at 03:27:00PM +0200, Ján Tomko wrote:
> > Delete support for other VCSs than git.
> >
> > This also removes a http: link.
> >
> > Signed-off-by: Ján Tomko <jtomko redhat com>
> > ---
> >  build-aux/vc-list-files | 24 ------------------------
> >  1 file changed, 24 deletions(-)
> >
> > diff --git a/build-aux/vc-list-files b/build-aux/vc-list-files
> > index af6b1c0f8a..31014d3b7a 100755
> > --- a/build-aux/vc-list-files
> > +++ b/build-aux/vc-list-files
> > @@ -25,7 +25,6 @@ scriptversion=2018-03-07.03; # UTC
> >  # list the version-controlled files in that directory.
> >
> >  # 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/
> >
> >  postprocess=
> >  case $1 in
> > @@ -75,29 +74,6 @@ do
> >      # belong to this package.
> >      eval exec git ls-tree -r 'HEAD:"$dir"' \
> >        \| sed -n '"s/^100[^	]*./$sed_esc/p"' $postprocess
> > -  elif test -d .hg; then
> > -    eval exec hg locate '"$dir/*"' $postprocess
> > -  elif test -d .bzr; then
> > -    test "$postprocess" = '' && postprocess="| sed 's|^\./||'"
> > -    eval exec bzr ls -R --versioned '"$dir"' $postprocess
> > -  elif test -d CVS; then
> > -    test "$postprocess" = '' && postprocess="| sed 's|^\./||'"
> > -    if test -x build-aux/cvsu; then
> > -      eval build-aux/cvsu --find --types=AFGM '"$dir"' $postprocess
> > -    elif (cvsu --help) >/dev/null 2>&1; then
> > -      eval cvsu --find --types=AFGM '"$dir"' $postprocess
> > -    else
> > -      eval awk -F/ \''{			\
> > -          if (!$1 && $3 !~ /^-/) {	\
> > -            f=FILENAME;			\
> > -            if (f ~ /CVS\/Entries$/)	\
> > -              f = substr(f, 1, length(f)-11); \
> > -            print f $2;			\
> > -          }}'\''				\
> > -        `find "$dir" -name Entries -print` /dev/null' $postprocess
> > -    fi
> > -  elif test -d .svn; then
> > -    eval exec svn list -R '"$dir"' $postprocess
> >    else
> >      echo "$0: Failed to determine type of version control used in `pwd`" 1>&2
> >      exit 1
> 
> I'm wondering whether we could not simplify this even more after this rewrite
> and drop the top level if-else checks since this is only used within
> syntax-check and we're now assuming git anyway, so .git must be present
> otherwise the repo is corrupt.

With all the other VCS removed there's little compelling reason for this
file to exist. I'd suggest we just delete the file entirely, and call
git ls-tree directly from the syntax-check.mk.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]