==== Merging Pull Requests from Github to Mercurial ==== 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]]. The steps for merging the pull requests back into Mercurial are as follows: - Install hg-git, see: http://hg-git.github.io/ * :!: 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. For example, if you used easy_install, do: easy_install hg-git==0.3.4 * :!: Be sure to add the hggit entry to your .hgrc file as docuemented on http://hg-git.github.io/ - Turn on the 'progress' extension: http://mercurial.selenic.com/wiki/ProgressExtension - If you don't already have one, clone the Mercurial repository: hg clone https://hg.csswg.org/test test-master - 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...) - Create a second local clone of the test repository: cd hg clone test-master test-github - In the test-github repository, pull from the repository listed in the Pull Request:cd test-githubhg pull git://github.com//csswg-test.git * 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. * :!: Note: You may see a message like: creating bookmarks failed, do you have bookmarks enabled? This can be safely ignored. - (Optional) To confirm you've pulled the changes from Github, compare your two local clones. hg out You should see all of the commits that are in the Pull Request - Merge those commits hg merge - Commit the merge hg commit -m "Merging PR #XX - https://github.com/w3c/csswg-test/pull/XX" - Push to the test-master local clone hg push ../test-master/ - Switch to the root directory of the test-master cd ../test-master/ - (Optional) To confirm you've pulled the changes from the second local clone, again, compare your two local clones. hg out Again, you should see all of the commits that are in the Pull Request plus the your commit from the merge in the step above. - Check if the new branch created additional heads: cd ../test-master hg heads - If there is more than one head, merge the branch: hg merge hg commit -m "Merging PR # xxx" - or possibly rebase it - hg rebase - If there is only one head, continue to the next step - Push the changes to the server: hg push