简体   繁体   中英

How to merge PR on forked project on Bitbucket with mercurial?

I have forked a mercurial project on bitbucet.org and I would like to merge a PR (to the original project) to an "old-version" branch in my fork. Is that possible? I haven't found any direct way of doing it and I don't see an option to download the PR as a patch file.

Just ignore any webinterface you are offered and use the VCS you use, how it was designed: pull and merge the remote changes in the completely traditional way with mercurial's own devices:

  1. in your local repo, pull from the repository which contains the interesting pull request. Pull the revision you are interested in:

    hg pull -rXXXX https://url.to.repo

    where XXXX is the tip of the interesting changesets, the HASH as mentioned in the pull request

  2. in your local repo, update to the revision YYYY you want to see the just pulled changesets merged into

    hg update -rYYYY

  3. Merge the changeset to the currently checked-out revision:

    hg merge -rXXXX

    where XXXX is the very same changesetID as you pulled before from the remote repo. Of course you might need to solve any merge conflicts, if the base of your desired merge point differs from the base the pull request is based on.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM