Changes between Version 3 and Version 4 of DarcsToGit


Ignore:
Timestamp:
Apr 1, 2011 3:28:21 PM (4 years ago)
Author:
simonpj
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DarcsToGit

    v3 v4  
    66 
    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. 
     8 
     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 
     13 
     14'''Step 1''': create `migrate`: 
     15{{{ 
     16cd $root 
     17darcs checkout http:://darcs.haskell.org/ghc 
     18mv ghc migrate 
     19}}} 
     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.) 
     21 
     22'''Step 2''': create `baseline-git`: 
     23{{{ 
     24cd $root 
     25git clone ghc/git baseline-git 
     26cd baseline-git 
     27git checkout -b "some-descriptive-name" ghc-darcs-git-switchover 
     28}}} 
     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. 
     30 
     31'''Step 3''': make `migrate/` into a Git repo too!  All we need do is to copy over Git's meta-data. 
     32{{{ 
     33cd $root/migrate 
     34mv ../baeline-git/.git . 
     35}}} 
     36 
     37'''Step 3''': transfer patches.  For each patch (or group thereof) you want to transfer, do this: 
     38 * Pull the patch into `tmp-git`: 
     39{{{ 
     40cd $root/migrate 
     41darcs pull ../my-darcs 
     42 ...interactively pull the patches you want... 
     43}}} 
     44 * Record a Git patch for this patch group 
     45{{{ 
     46git commit -a 
     47git checkout master 
     48git merge "some-descriptive-name" 
     49}}} 
     50 
     51'''Step 4''': validate and push to Git. 
     52 
     53----------------------  
     54old version 
    855 
    956First, make a backup of the darcs repo in case something goes wrong: