<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 11, 2014 at 10:14 AM, Chris Malone <span dir="ltr"><<a href="mailto:chris.m.malone@gmail.com" target="_blank">chris.m.malone@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hey devs,<div><br></div><div>I apologize in advance for my naivety...<br><div><br></div><div>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...</div></div></div></blockquote><div><br></div><div>Bookmarks are actually unnecessary.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div><br></div><div>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.  </div><div><br></div><div>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.</div></div></div></blockquote><div><br></div><div>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.</div><div><br></div><div>First, I take a look at this page: <a href="https://bitbucket.org/yt_analysis/yt/commits/branch/yt">https://bitbucket.org/yt_analysis/yt/commits/branch/yt</a></div><div><br></div><div>You want to update to the current tip of the yt branch (right now, this is the commit f663cb9):</div><div><br></div><div>hg pull <a href="https://bitbucket.org/yt_analysis/yt">https://bitbucket.org/yt_analysis/yt</a></div><div>hg up f663cb9</div><div><br></div><div>This will update away from  your current PR head.</div><div><br></div><div>Next, you need to do some work, fix a bug, whatever, and then commit it:</div><div><br></div><div><do work></div><div>hg commit -m "I did some work"</div><div><br></div><div>This will create a new local head.  Next, you push the new head to bitbucket:</div><div><br></div><div>hg push -r . -f <a href="https://bitbucket.org/my_username/yt">https://bitbucket.org/my_username/yt</a></div><div><br></div><div>"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.</div><div><br></div><div>Now you can create your PR on the bitbucket interface.</div><div><br></div><div>Bookmarks come in at the point where you create the new head.  Instead of just <do work>, I could have created a new bookmark:</div><div><br></div><div>hg bookmark mybookmark</div><div><do work></div><div>hg commit -m "I did some work"</div><div>push push -B mybookmark -f <a href="https://bitbucket.org/my_username/yt">https://bitbucket.org/my_username/yt</a></div><div><br></div><div>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.</div><div><br></div><div>Hope that's made things clearer,</div><div><br></div><div>Nathan</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><span class=""><font color="#888888"><div><br></div><div>Chris</div></font></span></div></div>
<br>_______________________________________________<br>
yt-dev mailing list<br>
<a href="mailto:yt-dev@lists.spacepope.org">yt-dev@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
<br></blockquote></div><br></div></div>