Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.2 Creating a branch

You can create a branch with tag -b; for example, assuming you're in a working copy:

 
$ cvs tag -b rel-1-0-patches

This splits off a branch based on the current revisions in the working copy, assigning that branch the name `rel-1-0-patches'.

It is important to understand that branches get created in the repository, not in the working copy. Creating a branch based on current revisions, as the above example does, will not automatically switch the working copy to be on the new branch. For information on how to do that, see Accessing branches.

You can also create a branch without reference to any working copy, by using rtag:

 
$ cvs rtag -b -r rel-1-0 rel-1-0-patches tc

`-r rel-1-0' says that this branch should be rooted at the revision that corresponds to the tag `rel-1-0'. It need not be the most recent revision – it's often useful to split a branch off an old revision (for example, when fixing a bug in a past release otherwise known to be stable).

As with `tag', the `-b' flag tells rtag to create a branch (rather than just a symbolic revision name). Note that the numeric revision number that matches `rel-1-0' will probably be different from file to file.

So, the full effect of the command is to create a new branch – named `rel-1-0-patches' – in module `tc', rooted in the revision tree at the point tagged by `rel-1-0'.


 
 
  Published under the terms of the GNU General Public License Design by Interspire