[lug] CVS question: Replacing head

Scott A. Herod herod at interact-tv.com
Wed May 1 13:14:02 MDT 2002


"D. Stimits" wrote:
> 
> "Scott A. Herod" wrote:
> >
> > Hello,
> >
> > I have a CVS question which doesn't seem to be answered by Karl Fogel's
> > book.
> >
> > I have a CVS respository with a project that has a trunk and one major
> > branch.  Basically, I want to make the branch the trunk without having
> > to painfully merge the two.  Is there a good CVS-way to do this?
> >
> > A little more details.
> >
> > To get the HEAD I can do:
> >
> > [top]$ cvs checkout project
> >
> > Now to merge:
> >
> > [top]$ cd project
> > [project]$ cvs update -j branch-YESTERDAY_VERSION -j
> > branch-TODAY_VERSION
> >
> > The problem is that I can't commit without dealing with all of the
> > diffs.  I really want it to behave as if my merge was an update of the
> > files from say:
> >
> > [project]$ cvs update -r branch-TODAY_VERSION
> >
> > But that sets a sticky-tag that I can't figure out how to ignore in a
> > commit.
> >
> > Any thoughts?
> >
> > Thanks,
> >
> > Scott
> 
> You could export the main somewhere, then do a cvs delete of all files
> in the main branch, followed by placing the branch into the main. Use of
> [non-branch] tags would make it safe. You could then even import the
> saved main as a branch "OLD_MAIN_BRANCH".
> 
> D. Stimits, stimits at idcomm.com

Thanks for the response, Dan.

I'm not sure what you mean by cvs delete and then placing the branch
into the main.  I've got about 500 files in numerous subdirectories.  I
now see that the 'cvs admin -bREVISION' command is supposed to change
the trunk to a given branch.  That might work.  I'll test.

Scott



More information about the LUG mailing list