Loading ...
Sorry, an error occurred while loading the content.

Re: Switching upstream from svn to hg

Expand Messages
  • björn
    ... Thanks for sharing Jiang...I will switch the MacVim.git repo to pull from the hg repo too...your instructions will most certainly help! Björn -- You
    Message 1 of 2 , Apr 13, 2010
    • 0 Attachment
      On 12 April 2010 09:35, Jjgod Jiang wrote:
      >
      > Up to now vim-cocoa [1] uses vim svn repo from sf.net [2] and git-svn
      > to mirror the upstream updates. Since Bram officially announced that
      > he will switch to hg for all future vim developments [3] and CVS will
      > be abandoned, the svn repo, which is synced from CVS, will soon become
      > deprecated. That's why I need to switch the upstream repo of vim-cocoa
      > from svn to hg.
      >
      > Here are the steps I found to be quite reliable:
      >
      > First of all, we need a separated, local vim hg repo:
      >
      >  $ hg clone https://vim.googlecode.com/hg/ vim-hg
      >
      > Second, we need a tool called hg-fast-export:
      >
      >  $ git clone git://repo.or.cz/fast-export.git
      >
      > Then, we can create a new git repo from scratch and import the hg repo
      > we previously cloned:
      >
      >  $ mkdir vim
      >  $ git init
      >  $ ../fast-export/hg-fast-export.sh -r ../vim-hg
      >  $ git repack -adf  # repack to optimize for disk usage
      >
      > The hg-fast-export.sh process will take a while, it can be run
      > multiple times to do incremental import.
      >
      > After that, I go back to my original git repo (branched from git-svn),
      > format everything diverged from upstream into patches:
      >
      >  $ cd ../vim-cocoa
      >  $ git format-patch ...
      >  (A bunch of .patch files will be created)
      >
      > Now we can import these patches into our new git repo:
      >
      >  $ cd ../vim
      >  $ git checkout -b cocoa
      >  $ cat ../vim-cocoa/*.patch | git am -3
      >
      > The "-3" option is for automatic 3-way merging, in case there may be
      > some patches do not apply.
      >
      > OK, now we get a new upstream from hg and all our commit history back
      > (assuming our old git repo is properly rebased). If upstream is
      > updated later, we can use the following commands to keep our
      > repo/branch in sync:
      >
      >  $ cd ../vim-hg; hg pull; cd -
      >  $ ../fast-export/hg-fast-export.sh -r ../vim-hg
      >  $ git rebase master
      >
      > I guess MacVim may also need this, hope it helps.

      Thanks for sharing Jiang...I will switch the MacVim.git repo to pull
      from the hg repo too...your instructions will most certainly help!

      Björn

      --
      You received this message from the "vim_mac" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      To unsubscribe, reply using "remove me" as the subject.
    Your message has been successfully submitted and would be delivered to recipients shortly.