Changes between Version 3 and Version 4 of DarcsToGit

Apr 1, 2011 3:28:21 PM (4 years ago)



  • DarcsToGit

    v3 v4  
    77This assumes that all your changes are in the ghc repo itself. Otherwise, if you have made changes to other repos (e.g. `libraries/base`) you'll need to do a similar procedure for those repos too. 
     9We'll assume the following directory setup, where `$root` is some directory in your file system 
     10 * `$root/my-darcs`: the Darcs repo that contains the patches you'd like to move over into Git.  We will make no changes to this repo. 
     11 * `$root/baseline-git` (initially non-existent): the Git repo at the moment of switchover 
     12 * `$root/migrate` (initially non-existent): during the transfer process this is going to be ''both'' a Darcs repo ''and'' a Git repo 
     14'''Step 1''': create `migrate`: 
     16cd $root 
     17darcs checkout http::// 
     18mv ghc migrate 
     20This gets a Darcs copy of the repo, precisely at the switchover point.  (We don't need a tag, because the Darcs repos were frozen precisely at switchover, so the HEAD will do.) 
     22'''Step 2''': create `baseline-git`: 
     24cd $root 
     25git clone ghc/git baseline-git 
     26cd baseline-git 
     27git checkout -b "some-descriptive-name" ghc-darcs-git-switchover 
     29This gets a Git copy of the repo, precisely at the point of switchover (that's what the `ghc-darcs-git-switchover` tag does).  At this moment all the source files in `migrate` and `baseline-git` should be bit-for-bit identical.  Check this. 
     31'''Step 3''': make `migrate/` into a Git repo too!  All we need do is to copy over Git's meta-data. 
     33cd $root/migrate 
     34mv ../baeline-git/.git . 
     37'''Step 3''': transfer patches.  For each patch (or group thereof) you want to transfer, do this: 
     38 * Pull the patch into `tmp-git`: 
     40cd $root/migrate 
     41darcs pull ../my-darcs 
     42 ...interactively pull the patches you want... 
     44 * Record a Git patch for this patch group 
     46git commit -a 
     47git checkout master 
     48git merge "some-descriptive-name" 
     51'''Step 4''': validate and push to Git. 
     54old version 
    956First, make a backup of the darcs repo in case something goes wrong: