DragonFly BSD
DragonFly kernel List (threaded) for 2004-07
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Maintaining local changes to the CVS tree


From: Einar Karttunen <ekarttun@xxxxxxxxxxxxxx>
Date: 24 Jul 2004 14:58:49 +0300

This documents explains how to maintain local changes 
to a remote CVS tree with cvs and cvsup. It is mainly 
meant for DragonFly, but can be applied  to other 
projects as well. The changes are maintained  in 
local branches which keep them from conflicting with 
upstream version numbers.

The version of cvs needs to support CVS_LOCAL_BRANCH_NUM 
which was added in version 1.12.1. DragonFly's version of
cvs works fine.

First one needs to create and initialize a cvs-root directory with
appropriate permissions. e.g.

setenv CVSROOT ~/cvs
mkdir $CVSROOT
cvs init

Next one needs to create a suitable sup-file for cvsup. Take the
example one from "/usr/share/examples/cvsup/DragonFly-supfile" and
make the following changes:

1) Change base if you want to. (for non-root operation)
2) Change prefix to the $CVSROOT directory that was created
3) Make sure that the release line has no tag.
4) Remove the "delete" option (just remove the word from the file)

Now you are ready to run cvsup. This will take some time in the 
first run. The checkout should create a directory named src under the
CVSROOT containing RCS-files. 

The next step is to choose a local branch number and name. The number
should be an even number that is unique for your repository and does
not conflict with branch numbers in the main repository. Any (even)
number between 20000-60000 will do. The branch name should be unique
to avoid future problems. 

For the example lets pick "40000" and "musasabi_branch". 

setenv CVS_LOCAL_BRANCH_NUM 40000
cvs rtag -b musasabi_branch src

Now we can checkout a working copy out of our local cvs repository: 

cd /where/i/want/to/work
cvs co -rmusasabi_branch src
# edit the sources
# commit changes
cvs ci


Updating from the central tree is easy. 

1) run cvsup with the sup-file
2) run "cvs update -j HEAD" in your work directory. This will also
   tell you about conflicts.


To create patches for submit one can use:

cvs rdiff -u -r musasabi_branch src


This is based on the work of Nanbor Wang 
(http://www.cs.wustl.edu/~nanbor/CVSUP/cvs-repo-sync.html)
Any feedback or comments are appreciated.


- Einar Karttunen



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]