[yt-dev] Exporting a pull request from BitBucket to GitHub

Matthew Turk matthewturk at gmail.com
Thu Apr 20 13:43:49 PDT 2017


Hi folks,

Here is the process I just used for exporting a pull request to GitHub.  It
went incredibly smoothly.  I will put this in a migration document as well.

Step 0: Make sure you have hg-git installed (it is pip installable) and
enabled in your ~/.hgrc .  Enabling it looks like this:

[extensions]
hggit=

Now, here are the steps:

 1. Fork http://github.com/yt-project/yt
 2. In your yt source repository, update to the latest changeset of your
pull request.
 3. If it does not have a bookmark, create one with "hg bookmark". It can
be something like "hg bookmark whatever_i_want_to_call_it"
 4. Edit your .hg/hgrc in your yt repository.  Under [paths] add a github
one.  For me, it looks like this:

[paths]
default = ssh://hg@bitbucket.org/MatthewTurk/yt
ytanalysis = ssh://hg@bitbucket.org/yt_analysis/yt
gh = git at github.com:MatthewTurk/yt
ghyt = git at github.com:yt-project/yt

You will need to modify `gh` here.

 5. Now, check what you're going to export.  "hg outgoing -r
whatever_i_want_to_call_it gh" will show you.  Make sure that this matches
what you anticipate.
 6. If it all looks good, push it *with the bookmark*.  "hg push -B
whatever_i_want_to_call_it gh" will do this.
 7. Reopen the pull request on GitHub, and decline your pull request on
BitBucket.

Here is the one I just did: https://github.com/yt-project/yt/pull/1346

This should make things very smooth to transition.  Since we're not yet
*accepting* things on GitHub, I would encourage folks to start moving their
long-term PRs.  (does that sound right, Nathan and Kacper?)

-Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-dev-spacepope.org/attachments/20170420/f71f89c8/attachment.htm>


More information about the yt-dev mailing list