Migrating to Git

To migrate ongoing work from CVS to Git SCM, you will first convert your work to a patch and then apply that patch to a Git tree as described in the procedures below.

Converting your work to patches
To convert your work to patches, follow one of these procedures.

For work that does NOT live in a private CVS branch...
If you maintain your development code with Quilt or something other than a CVS private branch, generate patches for any current work. cvs diff > my.patch

For work in a private CVS branch...
If your work resides in a private CVS branch, create a fork from the branch as follows:

1. In your branch CVS working tree, use cvs diff against the base tree divergence point. Since you've been using the build/merge scripts, this is quite easy. For example, for the branch params_tree, you would enter: cvs diff -r HD_PARAMS_TREE_BASE > hd_params_tree.patch The merge scripts have kept the  _BASE tag updated to reflect the latest merge (don't use an old dated tag, use the one ending in _BASE).

This cvs diff will include uncommitted changes in your working tree as well as all your committed code, so make sure your working directory tree is in the state you want.

2. Inspect your patch to make sure it is correct. It will be a patch against the divergence point, so realize that the base branch may have moved on and your patch may have to be updated when you apply it.

Applying your patches to a Git repo
To apply a patch to a Git repo, complete these steps.

1. Obtain a clone of the lustre repository. git clone --origin prime git@git.lustre.org:prime/lustre cd

2. Create your own private branch. For example, create a branch for bug 20000 based off of HEAD by entering: git checkout -b bug20000 master

3. Apply the patch to that branch. patch -p1 < hd_params_tree.patch

4. Resolve any merge conflicts and commit the patch (to your branch). git commit -a -v

Continuing Development
If you are an external contributor, follow the procedure for submitting patches.

If you are a Sun employee, continue development under Git as described on the Lustre GIT page.