info-cvs
[Top][All Lists]
Advanced

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

Communicating client information to the CVS server


From: Reinstein, Shlomo
Subject: Communicating client information to the CVS server
Date: Thu, 11 Jul 2002 18:01:28 +0300

Hi,

When working with a CVS server, is there a way to communicate non-CVS
related information from the client to the server (and vice versa)?

Let me explain what I would like to do. First some short background: We have
a system (made mostly of Perl scripts) that uses CVS for the source control
operations, but adds some functionality to it, as needed by our development
methodology. Our users do not run "cvs" directly, but rather they use our
system, which in turns runs "cvs" to execute the commands. Our system has a
special "shell", in which many environment variables are defined, and all
work with the system is done from within that shell.

"commit" is one of the operations in which our system extends the
functionality of CVS. The system checks a few pre-conditions, and only if
those pre-conditions are met, it calls "cvs commit". During the commit, log
information is collected using the CVSROOT/commitinfo and CVSROOT/loginfo
files, and when the commit is over, the system makes use of this log
information.
The pre-conditions checked by our system for "commit" have are not related
to the files to be committed; the system checks for the existence of some
files, both inside and outside the working directory. While it's simple to
check for them in the system, it is impossible to check for them in the
pre-commit script, which runs in a new process, and in the case of the CVS
server, even on a different machine in a completely different environment.

In order for the pre-condition checking to work, I need to disable check-ins
using "cvs commit", and enable check-ins only using our system. Currently,
we have a locally-mounted repository (we don't yet use client/server), and I
make the distinction between "cvs commit" and our system by checking for the
existence of some environment variable in the pre-commit script (which runs
by CVSROOT/commitinfo). The system sets this variable before calling "cvs
commit"; the users are not aware of this. If this environment variable does
not exist, then the pre-commit script knows that the user ran "cvs commit"
and exits with an error exit status. How can a similar thing be done with
client/server?

In the other direction - the post-commit script (which runs by
CVSROOT/loginfo) collects some information in a file, and then the system
reads this file when the commit is over. How can I achieve that with a
client/server model?

Thanks in advance,
Shlomo






reply via email to

[Prev in Thread] Current Thread [Next in Thread]