[lug] CVS question: Replacing head

D. Stimits stimits at idcomm.com
Wed May 1 12:58:58 MDT 2002


"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



More information about the LUG mailing list