How to divert a Bitbucket pull request to my own test repo?

Started by Marsu42, October 20, 2013, 05:00:28 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Marsu42

How do I add the code from a pull request to the main repo to my own repo fork (for example, if I want to try the adv_int module)?

All I can see is a possibility to get a diff for individual commits, but not for the whole pull request - and I am not able to divert a pull request via fork or compare to my own repo either.

dmilligan

you can specify a different repo in the hg pull command, simply specify the repo of the pull request, and pull into your local clone (I wouldn't try pulling into your bitbucket repo, so as to leave it 'clean', basically you're only modifying you're local repo clone)

http://www.selenic.com/mercurial/hg.1.html#pull

Marsu42

Quote from: dmilligan on October 21, 2013, 03:33:32 AM
you can specify a different repo in the hg pull command

Thanks a lot! ... I didn't think of this :-o

dmilligan

you might want to create a branch and then pull it into the branch so you can switch back more easily

Marsu42

Quote from: dmilligan on October 24, 2013, 01:56:22 AM
you might want to create a branch and then pull it into the branch so you can switch back more easily

Thanks again, it really works, I didn't know mercurial is clever enough not to overwrite changes I made in my repo, but just updates it with the newer files from the pull request as it's meant to do. 

The only problem I've recently read about (http://mercurial.selenic.com/wiki/PruningDeadBranches) that with mercurial - and unlike git - you cannot delete branches from your repo. eternally. ever. That's why I'm a bit shy with polluting my repo with branches, but I guess I should easy up a little on that :-p