This is an old revision of the document!


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 here.

The steps for merging the pull requests back into Mercurial are as follows:

  1. 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, like so:
      easy_install hg-git==0.3.4
  2. Turn on the 'progress' extension: http://mercurial.selenic.com/wiki/ProgressExtension
  3. If you don't already have one, clone the Mercurial repository:
     hg clone https://hg.csswg.org/test test-master 
  4. 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…)
  5. Create a second local clone of the test repository:
    cd <the directory that contains 'test-master'>
     hg clone test-master test-github
  6. In the test-github repository, pull from the repository listed in the Pull Request:
    cd test-github
    hg pull git://github.com/<git_user>/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.
    • Push the Pull Request branch into the 'test-master' repository:
      hg push -B <branch_name> ../test-master  (<branch_name> should be 'submissions/<git_user>')
  7. Delete the bookmark created for the new branch:
    hg bookmark -d <branch_name>
  8. cd back to the 'test-master' repository and check if the new branch created additional heads:
    cd ../test-master
    hg heads
  9. If there's only one head, continue to step 10, otherwise, merge the branch:
    hg merge
    hg commit -m "Merging PR # xxx"

    - or possibly rebase it

    hg rebase
  10. Push the changes to the server:
    hg push
 
test/pullrequests.1369787078.txt.gz · Last modified: 2014/12/09 15:48 (external edit)
Recent changes RSS feed Valid XHTML 1.0 Valid CSS Driven by DokuWiki