Changes between Version 6 and Version 7 of DarcsToGit


Ignore:
Timestamp:
Apr 1, 2011 3:41:31 PM (4 years ago)
Author:
igloo
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DarcsToGit

    v6 v7  
    1515{{{
    1616cd $root
    17 darcs checkout http:://darcs.haskell.org/ghc
     17darcs get http:://darcs.haskell.org/ghc
    1818mv ghc migrate
    1919}}}
     
    2323{{{
    2424cd $root
    25 git clone ghc/git baseline-git
     25git clone http://darcs.haskell.org/ghc.git/ baseline-git
    2626cd baseline-git
    2727git checkout -b "some-descriptive-name" ghc-darcs-git-switchover
    2828}}}
    29 '''SLPJ: the clone command should mention the actual URL, not assuming you have a current copy'''.
    3029This 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.
    3130
     
    3332{{{
    3433cd $root/migrate
    35 mv ../baeline-git/.git .
     34mv ../baseline-git/.git .
    3635}}}
    3736
     
    4645{{{
    4746git commit -a
     47}}}
     48
     49'''Step 5''': merge the patches into the git master:
     50{{{
    4851git checkout master
    4952git merge "some-descriptive-name"
    5053}}}
    51 '''SLPJ: is this commit/checkout/merge thing right?  Do you need to switch back to a branch for the next pull?  Do you get to write a commit message?'''
    5254
    53 '''Step 4''': validate and push to Git.
     55'''Step 6''': validate and push to Git.
    5456
    55 ----------------------
    56 old version
    57 
    58 First, make a backup of the darcs repo in case something goes wrong:
    59 {{{
    60 cp -a ghc/darcs ghc/backup-darcs
    61 }}}
    62 
    63 Now make sure `ghc/darcs` is fully up-to-date:
    64 {{{
    65 cd ghc/darcs
    66 ./darcs-all pull -a
    67 cd ../..
    68 }}}
    69 
    70 Next we checkout the git repo as it was at the darcs branch point:
    71 {{{
    72 git clone ghc/git ghc/migrate
    73 cd ghc/migrate
    74 git checkout -b "some-descriptive-name" ghc-darcs-git-switchover
    75 cd ../..
    76 }}}
    77 
    78 Now we put the git meta-data into our darcs repo, record the changes with git and merge them back to master:
    79 {{{
    80 cd ghc/darcs
    81 mv ../migrate/.git .
    82 git commit -a
    83 git checkout master
    84 git merge "some-descriptive-name"
    85 cd ../..
    86 }}}
    87 
    88 Finally, we pull the changes into our real git repo:
    89 {{{
    90 cd ghc/git
    91 git pull ../../ghc/darcs master
    92 }}}
    93 
    94 The `ghc/migrate` directory is no longer needed and can be removed.