info-cvs
[Top][All Lists]
Advanced

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

Re: easy way to move a directory down one level?


From: Paul Sander
Subject: Re: easy way to move a directory down one level?
Date: Wed, 26 Nov 2003 23:03:16 -0800

It can't be done unless you're willing to live with one of the following:

1.  Old releases fetched by timestamp or tag get pulled with the new
    organization.
2.  Revision history is fragmented among multiple files, and cannot merge
    between branches where one of the branches has been reorganized.
3.  History prior to reorg is preserved, storage doubles, and ongoing
    work on branches can't be merged if the reorg takes place on one of
    the branches.
4.  You can perform ad hoc versioning (by naming convention) in your
    modules database.

If you're willing to live with case 1, insert the directory directly in
the repository and have the users update their workspaces (or better yet,
commit their code before the reorg and delete their workspaces, then do
fresh checkouts).

If you're willing to live with case 2, then create directory a1/b in your
workspace, replicate the a/b directory structure in a/a1/b, cd to directory
a, and perform the following procedure for each file in the a/b directory
tree in your workspace:

        copy a/b/file to a/a1/b/file
        cvs rm a/b/file
        cvs add a/a1/b/file
        cvs commit

(Note that the commit can be done once after all of the adds and removes
are complete.)

For case 3, create directory a/a1/b in the repository and copy the RCS
files into it from the a/b tree.  Then perform "cvs remove" for all of the
files (on all branches) in a workspace and commit them.

If you're willing to live with case 4, then edit your modules database to
use inclusions and aliases (and shutting off recursive descent where
necessary) to remap each directory in the old tree to the new one in the
user's workspace.  Be sure that each module name is unique (most easily
done by inserting version numbers in the module names), and adopt a naming
convention to distinguish modules that are not to be accessed by end users.

Obviously, all of these have problems.  Cases 2, 3, and 4 don't scale well
if there are a lot of reorgs.  Cases 2 and 3 can't be reversed without
losing history.  Case 1 violates a basic requirement of version control.

The manual discusses most of these in some detail, plus a few others.
None of the procedures is ideal.

--- Forwarded mail from address@hidden

  what's the easiest way to shift an entire directory down one level in a
repository?

  at the moment, i have the directory structure .../a/b. i want to change
this to a/a1/b -- shift "b" down one level, and create a new intermediate
"a1" directory in between. this looks a bit trickier than i thought.

  what's the recommended way to do this?  note that the "b" directory
can be several levels deep.

--- End of forwarded message from address@hidden





reply via email to

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