[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Turning a branch into a new branch
From: |
Pierre Asselin |
Subject: |
Re: Turning a branch into a new branch |
Date: |
Sat, 03 Feb 2001 09:08:01 -0700 |
> 1. I checked out branch VERSION-A
> 2. I modified some files locally
> 3. I want to create from the these files VERSION-B
>
> CVS asks me to commit the modified files first. But I would commit them
> to VERSION-A, though they should not exist in VERSION A.
General procedure to start a new branch as an afterthought:
$ cvs tag VERSION-B-bp : tag the starting point
$ cvs tag -b VERSION-B : create the branch
$ cvs update -rVERSION-B : get on the branch
$ cvs commit : commit pending changes to the branch
The first command places the tag `VERSION-B-bp' on the revision you
checked out (i.e. before your changes). It's for future reference only.
The second command starts a branch off of the same revision, still before
your changes.
The third command "puts you on the branch". This consists of two actions:
1) It merges the pending changes in your sandbox with all the changes that
have occurred on branch `VERSION-B'; the branch is empty, so this is a
vacuous merge. Your sandbox files don't really change.
2) It plants a sticky tag for `VERSION-B' in your sandbox's administrative
files.
The fourth command commits your changes. Because of the sticky tag, the
commit goes to VERSION-B. Use `cvs update -A' to stop working on the branch
and return to the trunk.
--
Pierre Asselin
Westminster, Colorado