[yt-dev] How to issue multiple PR's on BitBucket?

Nathan Goldbaum nathan12343 at gmail.com
Thu Sep 11 10:25:30 PDT 2014


On Thu, Sep 11, 2014 at 10:14 AM, Chris Malone <chris.m.malone at gmail.com>
wrote:

> Hey devs,
>
> I apologize in advance for my naivety...
>
> I asked this in IRC, and Kacper was kind enough to provide some insight,
> but alas I was still having problems getting this to work.  I know it
> involves bookmarks and heads, but I'm still not as familiar with mercurial
> as I am with git, so this all confuses my gitsense.  Also, I know there are
> others who have this issue - perhaps this should be on the docs page
> somewhere...
>

Bookmarks are actually unnecessary.


>
> Let's say I have my fork of yt wherein I already have a pending PR on BB.
>  I can't simply make changes to my fork and push them in the default
> branch/bookmark because BB likes to automagically update PRs.
>
> What is the recommended procedure for committing and pushing new changes
> to my fork so that I can issue an additional PR?  Do I create a bookmark,
> then commit my changes, then push that bookmark to BB?  If so, how then can
> I issue a PR from that bookmark - I can't seem to find this on the BB
> interface.
>

Maybe this is a little awkward because it requires me to look at the
current state of the yt_analysis/yt repo, but it works for me.

First, I take a look at this page:
https://bitbucket.org/yt_analysis/yt/commits/branch/yt

You want to update to the current tip of the yt branch (right now, this is
the commit f663cb9):

hg pull https://bitbucket.org/yt_analysis/yt
hg up f663cb9

This will update away from  your current PR head.

Next, you need to do some work, fix a bug, whatever, and then commit it:

<do work>
hg commit -m "I did some work"

This will create a new local head.  Next, you push the new head to
bitbucket:

hg push -r . -f https://bitbucket.org/my_username/yt

"push -r ." means "push only the commit I'm standing on and any ancestors".
 I needed to force push since I'm creating a new remote head.

Now you can create your PR on the bitbucket interface.

Bookmarks come in at the point where you create the new head.  Instead of
just <do work>, I could have created a new bookmark:

hg bookmark mybookmark
<do work>
hg commit -m "I did some work"
push push -B mybookmark -f https://bitbucket.org/my_username/yt

The bookmark just names the commit head.  I tend not to use bookmarks for
one-commit bugfixes but they're definitely useful for longer lived work.

Hope that's made things clearer,

Nathan


>
> Chris
>
> _______________________________________________
> yt-dev mailing list
> yt-dev at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-dev-spacepope.org/attachments/20140911/e7f60572/attachment.html>


More information about the yt-dev mailing list