none
[openafs-wiki.git] / AFSLore / OpenAFSCVSToGitConversion.mdwn
index cb65a72..feec681 100644 (file)
@@ -1,3 +1,115 @@
-[[OpenAFS]] CVS to git conversion procedure.
+# <a name="Git Plan:"></a> Git Plan:
+
+## <a name="Set up base Repo"></a> Set up base Repo
+
+### <a name="Prep:"></a> Prep:
+
+### <a name="Process:"></a> Process:
+
+#### <a name="(commit 1) Start from IBM 1.0 +"></a><a name="(commit 1) Start from IBM 1.0 + "></a> (commit 1) Start from IBM 1.0 + 3.6 docs
+
+[
+
+- (in a tmp directory) cvs -d:pserver:anonymous@cvs.openafs.org:/cvs -z5 export -ropenafs-stable-1\_1\_0 openafs/doc
+- Make and change to git\_base directory
+- untar openafs-1.0-src.tar.gz
+- move tmp ´doc´ folder into git\_base
+- untar initial-commit-postapply.tar
+- git init
+- git add .
+- git commit -m "Initial IBM source code import\\rDelta initial-20001103" --author="Transarc &lt;afs@transarc.com&gt;"
+
+]
+
+#### <a name="(commit 2) Apply license changes"></a> (commit 2) Apply license changes
+
+[
+
+- Apply 2.patch
+- Cleanup: rm .rej &amp; .orig
+- untar 2-postapply.tar
+- git commit -m "" --author="Transarc &lt;afs@transarc.com&gt;"
+
+]
+
+### <a name="Patch Fixup"></a> Patch Fixup
+
+- Original codebase had bit errors; tarball used for git base does not have them, remove (most of) these fixes from patchsets
+
+]
+
+### <a name="Repo Fixup"></a> Repo Fixup
+
+[
+
+- Resolve issues into commit 3
+  - Part of the doc tree was not in the initial import
+  - README files were missing
+  - IBM tree has munged tags; cvsps output does not...
+    - Check in IBM tree to CVS, export -kk and use resulting diff -R to make all Revisions in the tree unmunged
+- Store commit 3 diff
+- Stash commit 2
+- Reset to commit 1
+- Apply commit 3 diff
+- Amend commit 1
+- Reapply commit 2
+
+]
+
+### <a name="Issues:"></a> Issues:
+
+license changes won´t apply cleanly as initial was from RCS and CVS munged rev vars on checkout
+
+## <a name="Automate patch - branches"></a> Automate patch -&gt; branches
+
+### <a name="Prep:"></a> Prep:
+
+### <a name="Process:"></a> Process:
+
+- Clone base repo (git clone git\_base git\_working)
+- Starting with 3.patch
+- Loop:
+  - Create branch with patch/delta name (git checkout -b)
+  - Apply patch (git apply --index)
+  - Commit (-m ´Apply patch X´)
+
+### <a name="Issues:"></a> Issues:
+
+## <a name="Handle binaries"></a> Handle binaries
+
+### <a name="Prep:"></a> Prep:
+
+- Find a list of binaries in cvs, search for '^expand\\w+@b|o@'
+
+### <a name="Process:"></a> Process:
+
+- Loop:
+  - For patch X
+  - Parse file list from patch X
+  - If patch has binary files, git check out branch X
+  - For each binary file, CVS check out listed revision over existing file
+  - Commit (-m ´Adding binaries´)
+
+## <a name="Merge branches into master branc"></a> Merge branches into master branch
+
+### <a name="Prep:"></a> Prep:
+
+- Parse patches to make X.msg &amp; X.author
+
+### <a name="Process:"></a> Process:
+
+- Loop:
+  - Merge branch X into master (git merge --squash)
+  - Commit with message &amp; author for patch X (git commit)
+  - ! On failure... stop, and allow for reset
+- Push master to origin/master
+
+## <a name="Validate and release"></a> Validate and release
+
+- Check that checkout of master matches cvs HEAD
+
+## <a name="Handle tags"></a> Handle tags
+
+- Determine tag-&gt;delta relationship
 
 -- [[MichaelMeffie]] - 28 Oct 2008