Re: CVS: versioning and branching
Steven Armstrong <[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.devel |
|---|---|
| Message-ID | <[email protected]> |
Here's a short summary of how versioning/branching works. Notes: If you're tagging or branching based on your local working copy use 'cvs tag' from within your working copy. If doing it without a working copy use 'cvs rtag'. Branches and tags are allwais created directly on the server. You can't commit directly to a version. Create a branch based on it first. $ cd /path/to/local/working/copy $ cvs status Gives some helpfull information which branch/version you currently have loaded in your working copy. Creating a version/tag ---------------------- $ cd /path/to/local/working/copy $ cvs tag -r <tagname> Alternatively: $ cvs rtag -r <tagname> <modulename> Creating a branch ----------------- $ cvs tag <tagname> First tag a version. This will provide a starting point for merging the branch back to the source branch. If there's already a tag/version available to branch from this can be omitted. $ cvs tag -r <tagname> -b <branchname> This creates the branch <branchname> based on the version <tagname>. Alternatively: $ cvs rtag -r <tagname> -b <branchname> <modulename> This does the same, but you don't have to be in your, or have a, local working copy. If you ommit -r <tagname> the branch is created based on CVS HEAD. Checking out a version or branch -------------------------------- $ cvs checkout -r <tagname> -dP which is the same as: $ cvs checkout -r <branchname> -dP Updating to a version or branch -------------------------------- $ cvs update -r <tagname> -dP which is the same as: $ cvs update -r <branchname> -dP Merging branches ---------------- First change your local working copy to the target branch. (You'll lose stuff you haven't comitted to your branch!) $ cvs update -r <targetbranch> -C -dP If merging to HEAD you can use: $ cvs update -A -C -dP Now do the merge: $ cvs update -j <tagname> -j <branchname> -dP Where <tagname> is the tag identifying the state at which you created the branch. Then commit the changes to the target branch: $ cvs commit -m "Merged <branchname> branch to <targetbranch>." to be continued ... ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click