[Top][All Lists]

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

How to find out the CVSROOT and location in the repository of a w orking

From: Reinstein, Shlomo
Subject: How to find out the CVSROOT and location in the repository of a w orking directory
Date: Sun, 23 Jun 2002 17:11:08 +0300


Is there a "clean" way to find out what is the CVSROOT of a working
directory and where in the repository it is located? I need to find that out
from within a Perl script, and by "clean" I mean that I prefer not to look
into the CVS/Root and CVS/Repository files, because I consider them to be
CVS internals that might change some day.
I know that using "cvs status" I can find out the whole repository path, but
there is no separation between the CVSROOT and the location inside the

To be more specific about what I need (maybe there's a way to do it without
caring for the CVSROOT and location), I have a file in each module that has
a fixed name and is used by my script to enable users to "lock" the module
for a short time. Whenever a new branch is created for a module, this file
should be "initialized" for that branch, to indicate that the branch is "not
locked". To do this, the script should modify it and commit a new revision
of it into the branch. (This is needed because the file might indicate
"locked" state for the root of the branch.) In order to do this, I want to
check-out a fresh copy of that file (okay, with its whole directory) to a
temporary directory, and then do these things on the copy in the temporary
directory. In order to check it out, I need the CVSROOT and location within
the repository.


reply via email to

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