[Top][All Lists]

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

Re: Removing directory in cvsroot

From: Eric Siegerman
Subject: Re: Removing directory in cvsroot
Date: Fri, 3 Jan 2003 13:20:02 -0500
User-agent: Mutt/1.2.5i

On Fri, Jan 03, 2003 at 10:12:05AM -0600, Daniel Hurtubise wrote:
> For example, my cvsroot directory has subdirectories PROJECT/1.0/, and now
> that I've figured out how to use tags for releases, I want to eliminate the
> 1.0 subdirectory in my directory structure.
> Can this be done?

I take it you don't want to delete the contents, but just to move
everything up a level, from PROJECT/1.0 into PROJECT.  Is that
right?  If so...

Yes, it can be done, but not prettily.  You'd have to just go
into the repo and move the stuff, then rmdir the now-empty 1.0
subdirectory.  This would break everyones' sandboxes of course;
they'd have to check out fresh, or else go through all their
CVS/Repository files deleting the "/1.0" substrings -- there are
scripts for this sort of thing floating around, perhaps even in
CVS's contrib directory.

The reorganization might break old builds too, though, should you
ever need to build a pre-reorg version.  Or it might not,
depending on the details of your setup.  If this will be a
problem, though, an alternative to what I've suggested would be
something along this line:
  - copy, not move, the repo files from PROJECT/1.0 to NEWPROJECT
  - have everybody check out from NEWPROJECT (or retarget their
    sandboxes, as mentioned above)
  - keep PROJECT/1.0 around for posterity, but stop using it for
    any new work
  - "chmod -R a-w PROJECT/1.0", to guard against accidental
    commits to the wrong place (actually you only need to chmod
    the directories, since the files should already be read-only)

(Unfortunately, this approach requires changing the module's
name; for a copy as opposed to a move, you can't just copy
PROJECT/1.0 to PROJECT.  If you did, CVS would want to check out
both copies, giving you both PROJECT/foo and PROJECT/1.0/foo on a
fresh checkout, or on a "cvs update -d".)

Another possibility would be to paper over the problem.  Just
add a line to CVSROOT/modules:
Then people can say "cvs co NEWPROJECT" and get what they expect.
This doesn't get rid of the 1.0 level.  It doesn't even retire it
from active use, since the "NEWPROJECT" name is *only* used for
initial checkouts; after that, things work just as before, right
down to the "PROJECT/1.0/foo,v" pathnames reported by CVS
commands.  So this is pretty ugly, but it's easy.  It might make
a good short-term solution until you're ready to implement one of
the others -- especially if the copying approach is your
long-term solution of choice, but there's still post-release
bug-fix work happening on the 1.0 code, which would prevent you
from retiring that (pseudo-) branch yet.


|  | /\
|-_|/  >   Eric Siegerman, Toronto, Ont.        address@hidden
|  |  /
Just Say No to the "faceless cannonfodder" stereotype.
        - (an Orc site)

reply via email to

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