WARNING: This is the _old_ Lustre wiki, and it is in the process of being retired. The information found here is all likely to be out of date. Please search the new wiki for more up to date information.

Migrating to Git

From Obsolete Lustre Wiki
Jump to navigationJump to search

(Updated: Dec 2009)

To migrate ongoing work from CVS to git SCM, first convert your work to a patch, then apply that patch to a git tree.

Convert your work to patches

Work that does NOT live in a private CVS branch

If you maintain your development code with quilt or something else other than a CVS private branch, generate patches for any current work.

cvs diff > my.patch

Work from a private CVS branch

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, params tree branch:

cvs diff -r HD_PARAMS_TREE_BASE > hd_params_tree.patch

The merge scripts have kept the <branchname>_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.

Apply your patches to a git repo

Obtain a clone of the Lustre repository.

git clone --origin prime [email protected]:prime/lustre <mydir>
cd <mydir>

Create your own private branch. For example, a branch for bug 20000 based off of HEAD:

git checkout -b bug20000 master

Apply the patch to that branch

patch -p1 < hd_params_tree.patch

Resolve any merge conflicts, and commit the patch (to your branch)

git commit -a -v

Continue development

Sun employees should continue development under git as per the Lustre GIT page.

External contributors should follow the procedure for submitting patches.