I recently joined a company that's using CVS.  I've read all but a couple of
chapters in "Open Source Development with CVS" (great book Karl) and read
select sections of Cederqvist.  The repository is on a SPARC Solaris 7.0
system while the developers are working on NT systems using WinCVS.

I need to lock CVS for a final code freeze and planned on using the
commitinfo file to accomplish this.  I created a test environment like the
one described in "Open Source Development with CVS" with both the repository
and workspaces within my home directory of a Sun system (i.e., no NT, no
WinCVS).  I made the following entry in commitinfo:

        ^myproj  nocheckin

The "nocheckin" program simply exits with 1.  Sure enough, commits were
prohibited.  I then changed commitinfo as follows:

        ^myproj/b-subdir  nocheckin

I editted myproj/hello.c, myproj/a-subdir/whatever.c and
myproj/b-subdir/random.c.  I then ran "cvs commit" from myproj.  The message
states the following when it examines the b-subdir directory:

        cvs commit: Pre-commit check failed
        cvs [commit aborted]: correct above errors first!

That is as I would expect.  However, the commit never takes place for
myproj/hello.c or myproj/a-subdir/whatever.c.  I can see that cvs does an
examine of myproj and myproj/a-subdir, but doesn't perform the commits. If I
type "cvs commit hello.c", it does commit.  If I remove the entry from
commitinfo, I do not have to specify files when committing.  I also tried
adding a "DEFAULT" entry in commitinfo with a program that does nothing but
return 0, so commitinfo looked like this:

        ^myproj/b-subdir  nocheckin
        DEFAULT  checkinok

The "checkinok" program simply returns 0.  However, I still have to specify
the filename when performing the commit.  Am I doing something wrong?

Thanks in advance.
-Scott

Reply via email to