Re: Checking out PRs as local branches

If you don't want hundreds of local branches for all of the PRs, you can
create an alias for fetching a single PR as documented on
http://contribute.jquery.org/repo-maintainers-guide/#fetch-the-pull-request.


On Mon, Jul 14, 2014 at 5:03 AM, Michael[tm] Smith <mike@w3.org> wrote:

> This is just an FYI for anybody who's reviewing PRs.
>
> Instead of needing to rely on the "w3c-test:mirror" thing to get a remote
> copy of fork for a particular PR with tests that you can run, you can get a
> local copy by actually checking out the PR to your w-p-t working directory.
>
> To enable that, run the following command from within your w-p-t directory
> -
>
>   git config --add remote.origin.fetch
> "+refs/pull/*/head:refs/remotes/origin/pr/*"
>
> From then on, any time you fetch or pull from the remote w-p-t repo, you'll
> automatically also fetch branches for all the PRs in the repo.
>
> So the next time you do a "git fetch" or "git pull", after that you can
> check out any particular PR like this:
>
>   git checkout pr/519
>
> Then, if the submittor of PR #519 subsequently pushes some further changes
> to that PR, you can also pull those additional changes by doing this:
>
>   git fetch
>   git checkout pr/519
>   git merge origin/pr/519
>
> After that, you can run the tests from that PR just by going to
> http://web-platform.test:8000 on your own machine and navigating to
> whatever directory the tests for that PR are in.
>
> I personally find this better and easier -- because I don't need to rely on
> the "w3c-test:mirror" thing any longer, and I don't need to have an
> Internet connection to check the test results for the PR, because I can
> just run the tests locally (which is a nice feature to have when you want
> to take a look at some PRs while you're, say, working while commuting to
> the office by train, or on a long plane flight with no wifi).
>
>   --Mike
>
> --
> Michael[tm] Smith http://people.w3.org/mike
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iQIcBAEBCgAGBQJTw5zsAAoJEIfRdHe8OkuVnRkP/1VYzl/orU51YBvLZ297aaOy
> em0CCXU/VN35F4Ie3mumrlOH8oqEotCyPsdZH4Ak0QWo1pAURApL93KRidMSNm8o
> 1YXeHHhKGtl/9hOrLC0+mWRgTfKeCwtxsFgK8X/N2l/d25iKojjCdDOUhs17wKml
> m/XAnmZHOTPmhOlH6+PqvQ2gyigydMWzYtCW3wX8zhueQ1h92tkEfUhdVtsygceQ
> xZ02PMizyX8Mg2e93gO45sQzF2dMO2fa56WSpQO82OnicuUmrQ/ik9f0e+uM09cl
> BBoM7Q/TwX7RRxnpDt+uw0ej/957j7esZdjIU/ulIcIXek+B5GhJ9y+HMJPuVazP
> H1B8kaiUIFBzs0Mh6zwTwXN1CkVUxlCvLHV+3Vvv44GZ2+luF59TbD6VmnDpSbqI
> blbrF3qjt4hzoZfBOBhz72ZhDxyMueO2hk4tAwf5bvF/nfpM7xh5GMyXgn6YC86R
> paNM1yPXaD+EwrtDD0eeNTAkFNJIkT8ajIaBA1KulnRfmLUTtLNkt02UTizYMaV7
> Am8rx7tkQI7EcOg0aE5zm82n44h8wkdhRp1g4mPTg2RDBF2FGY0vdBsXQjxrG5sc
> 1lEP70bbiCoon152XVxWfT1KtPZsH7/FplEC5z+zJryeLSfwZqxFnZbDKR7rR/dH
> rQwKGQo1l26d5L9bKUDz
> =x/xo
> -----END PGP SIGNATURE-----
>
>

Received on Monday, 14 July 2014 13:00:42 UTC