Skip site navigation (1) Skip section navigation (2)

Re: .cvsignore file

From: Rod Taylor <rbt(at)rbt(dot)ca>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: .cvsignore file
Date: 2002-10-12 14:57:39
Message-ID: 1034434660.6674.110.camel@jester (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
On Sat, 2002-10-12 at 00:56, Tom Lane wrote:
> Rod Taylor <rbt(at)rbt(dot)ca> writes:
> > On Fri, 2002-10-11 at 00:22, Tom Lane wrote:
> >> This strikes me as a bad idea.  We use .cvsignore only for files that
> >> should survive "make distclean", which the built docs files surely
> >> shouldn't.
> > Why not ignore the set of compiled files as well?  I realize its a much
> > larger list, but seems a fairly common thing to do.
> Well, exactly, it's a much larger list, and hence a much larger
> maintenance effort.  If it were near-zero cost to maintain then
> I'd be okay with it ... but right now, it seems most reasonable
> to expect people to do "make distclean" before they try a "cvs diff".
> In practice, you have to be mighty savvy to do "cvs update"s without a
> "make distclean" beforehand --- I don't ever risk it myself; the extra
> machine cycles for a full rebuild are way cheaper than my time to debug
> an incomplete rebuild.  So I have little concern for the "cvs diff"
> case.

Yes, before updating you definitely want to do that, but it usually
takes me a few tries to undo parts where I've gone wrong.  So diffs
regularly happen along the way.

Anyway, don't maintain by hand

The below should make .cvsignore entries for most files.  I can test it,
and clean it up to be put under src/tools if wanted if this method is
ok.  No, it's not perfect but running it shortly before or after a
pgindent run would cover 90% of the cases.

# Run from PGSQL directory
find * -name .cvsignore -delete
make all check
cd doc/src && make all && cd ..
cvs diff 2>&1 | perl -e '
  while ($line = <STDIN>)
    if ($line =~ /^\?\s.*\/.*/)
      $line =~ s/^\?\s(.*\/)([^\/]+)$/echo \"$2\" >> $1.cvsignore\n/;
      print $line;
    } elsif ($line =~ /^\?\s/)
      $line =~ s/^\?\s([^\/]+)$/echo \"$1\" >> .cvsignore\n/;
      print $line;
  }' | sh

  Rod Taylor

In response to


pgsql-patches by date

Next:From: Tom LaneDate: 2002-10-12 15:46:58
Subject: Re: .cvsignore file
Previous:From: Bruce MomjianDate: 2002-10-12 14:45:47
Subject: Re: Catalogs Doc update

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group