[Top][All Lists]

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

Re: cvs admin -l and moving attic files to another directory

From: Eric Siegerman
Subject: Re: cvs admin -l and moving attic files to another directory
Date: Tue, 3 Jul 2001 18:09:09 -0400
User-agent: Mutt/1.2.5i

On Tue, Jul 03, 2001 at 01:45:14PM -0700, Anita Chacko wrote:
> When I run cvs admin -l in my working directory in
> order to lock the whole repository,

That's not really what "cvs admin -l" is for.  It puts an
RCS-level lock on each file, which isn't what's needed here.  

You ended up getting the desired result, kind of, but only
because a bug in CVS counteracted your misunderstanding :-) Like
most other CVS operations, this one puts a temporary lock on the
affected directories, does what it wants to do, then releases the
lock.  But it aborted with the job half-done, and left its
"temporary" locks lying around.  So your repo is now locked ...
but you won't be able to use CVS to unlock it.

("Segmentation fault (core dumped)" is pretty much the Unix
equivalent of the Windows error that goes something like "This
program has performed an illegal operation and will be shut
down" or MacOS's bombs).

CVS doesn't provide a way to "lock the repository".  When someone
says to do that before performing surgery, they mean you have to
lock it external to CVS.  Some possibilities (in my own
decreasing order of preference) would be:
  - Bring the CVS server machine to single-user state, so nobody
    but you has access.
  - Temporarily rename the repository directory.  People trying to
    use CVS will get nasty error messages; tough luck.
  - Set the permissions on the repository root so that nobody but
    you has access to it.
  - Turn off whatever client/server connection method you're
    using.  If pserver, comment out the appropriate line in
    inetd.conf -- don't forget to HUP inetd!  If SSH, how you do
    this will depend on your precise setup.

There may be other ways besides these.

> Also I want to move all the attic files to another
> tree within the repository,in the same path as they
> were before.What is the best way to do this without
> losing history ofcourse?We have hunderds of files in
> attic and they want it cleaned up but we may need them
> sometime in the future.

If you want people to be able to do "cvs log" on these files, to
do "cvs update -p" on them to see what they contained, and
especially if you want to be able to easily get back old versions
of the project ... DON'T DO THIS.  Most of the time, CVS is able
to completely ignore the files in the Attic directories, so that
they don't add any performance penalty.  It can't *always* ignore
them, but the times when it must look at them are precisely those
times that you'll regret it if you moved them someplace else.


|  | /\
|-_|/  >   Eric Siegerman, Toronto, Ont.        address@hidden
|  |  /
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea.
        - RFC 1925 (quoting an unnamed source)

reply via email to

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