GHC Trac Home
Working on GHC
Mailing Lists & IRC
All Feature Req's
Tickets I Created
Patches for review
New Feature Req
Forgot your password?
side by side
lines around each change
White space changes
04/01/11 08:28:21 (
This 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.
We'll assume the following directory setup, where `$root` is some directory in your file system
* `$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.
* `$root/baseline-git` (initially non-existent): the Git repo at the moment of switchover
* `$root/migrate` (initially non-existent): during the transfer process this is going to be ''both'' a Darcs repo ''and'' a Git repo
'''Step 1''': create `migrate`:
darcs checkout http:://darcs.haskell.org/ghc
mv ghc migrate
This 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.)
'''Step 2''': create `baseline-git`:
git clone ghc/git baseline-git
git checkout -b "some-descriptive-name" ghc-darcs-git-switchover
This 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.
'''Step 3''': make `migrate/` into a Git repo too! All we need do is to copy over Git's meta-data.
mv ../baeline-git/.git .
'''Step 3''': transfer patches. For each patch (or group thereof) you want to transfer, do this:
* Pull the patch into `tmp-git`:
darcs pull ../my-darcs
...interactively pull the patches you want...
* Record a Git patch for this patch group
git commit -a
git checkout master
git merge "some-descriptive-name"
'''Step 4''': validate and push to Git.
First, make a backup of the darcs repo in case something goes wrong: