|
| 1 | +==== Merging Pull Requests from Github to Mercurial ==== |
| 2 | + |
| 3 | +All submissions to Mercurial are mirrored on Github and refreshed every few minutes. If contributors wish to submit tests directly to Github (bypassing setting up Mercurial), they may do so and their submissions are handled through pull requests. The process for submitting new tests through Github is documented [[http://testthewebforward.org/resources/github_test_submission.html|here]]. |
| 4 | + |
| 5 | +The steps for merging the pull requests back into Mercurial are as follows: |
| 6 | + |
| 7 | + |
| 8 | + - Install hg-git, see: http://hg-git.github.io/ |
| 9 | + * :!: Important: Do not install the latest version as there are known problems. Instead, install version 0.3.4, which has been tested to work with the latest version of Mercurial, like so: <code>easy_install hg-git==0.3.4</code> |
| 10 | + - Turn on the 'progress' extension: http://mercurial.selenic.com/wiki/ProgressExtension |
| 11 | + - If you don't already have one, clone the Mercurial repository: <code> hg clone https://hg.csswg.org/test test-master </code> |
| 12 | + - If you already have a clone, make sure it's in sync with the server: (i.e. 'hg stat' to make sure you have no outstanding changes; 'hg out' to make sure you have no unpushed changesets, push them now if you do; 'hg pull -u'; alternatively, just make a fresh clone...) |
| 13 | + - Create a second local clone of the test repository: <code>cd <the directory that contains 'test-master'></code><code> hg clone test-master test-github</code> |
| 14 | + - In the test-github repository, pull from the repository listed in the Pull Request:<code>cd test-github</code><code>hg pull git://github.com/<git_user>/csswg-test.git</code> |
| 15 | + * The first time you do this will take a loooong time as it exports the hg data to git format (long as in 3-4 hours, the progress extension helps you see what's going on). This is a one-time operation; subsequent pull requests happen quickly. |
| 16 | + * Push the Pull Request branch into the 'test-master' repository: <code>hg push -B <branch_name> ../test-master (<branch_name> should be 'submissions/<git_user>')</code> |
| 17 | + - Delete the bookmark created for the new branch: <code>hg bookmark -d <branch_name></code> |
| 18 | + - cd back to the 'test-master' repository and check if the new branch created additional heads:<code>cd ../test-master</code><code>hg heads</code> |
| 19 | + - If there's only one head, continue to step 10, otherwise, merge the branch:<code>hg merge</code><code>hg commit -m "Merging PR # xxx"</code> - or possibly rebase it <code>hg rebase</code> |
| 20 | + - Push the changes to the server: <code>hg push</code> |
0 commit comments