Bitbucket Pull Requests Merged?

CyanWorlds.com Engine Project Management
Post Reply
User avatar
JWPlatt
Member
Posts: 1099
Joined: Sun Dec 07, 2008 7:32 pm
Location: Everywhere, all at once

Bitbucket Pull Requests Merged?

Post by JWPlatt » Fri Jan 27, 2012 9:48 pm

I couldn't help but notice D'Lanor's frustration with BitBucket today about merged pull requests. I remember rarified had the same trouble a while back. I don't know if there is a way to avoid this, or if BitBucket is trying to be too clever for its own good. But if anyone can explain this effect and how to avoid it (please - besides "use github"), that might be very helpful to everyone. We want to maintain one fix/feature per commit or pull request. Also, if it's a bug or misfeature, I can take the issue to BitBucket if explained well enough for them to understand.
Perfect speed is being there.

User avatar
Hoikas
Member
Posts: 286
Joined: Fri Jun 03, 2011 8:38 pm

Re: Bitbucket Pull Requests Merged?

Post by Hoikas » Fri Jan 27, 2012 11:17 pm

This post is sufficiently vague that I honestly don't know what the problem is :?
Image

User avatar
D'Lanor
Member
Posts: 142
Joined: Tue Dec 23, 2008 11:23 pm

Re: Bitbucket Pull Requests Merged?

Post by D'Lanor » Sat Jan 28, 2012 12:20 am

10 days ago I created a pull request following this tutorial. Then yesterday I committed a fix for blank pages in the city book and wanted to create a new pull request for it. Following the same tutorial I compared the forks again and there was this big fat button that said "update pull request", just begging to be pressed... which I did, expecting a list from which to pick the latest revision. Instead it immediately merged all the differences into the old pull request.

What I "think" I should have done is first select the latest revision and then click on the not so very big blue arrow pointing to the left. The 101 tutorial does not explain this so it is bound to go wrong the first time when you are a Bitbucket newbie like me.

User avatar
Hoikas
Member
Posts: 286
Joined: Fri Jun 03, 2011 8:38 pm

Re: Bitbucket Pull Requests Merged?

Post by Hoikas » Sat Jan 28, 2012 12:38 am

I'm not sure what that big fat button is supposed to do, but your second guess sounds like a better bet to me. In fact, now that I look at it, that is pretty much what you want to do--though I would recommend creating a named branch (these are technically in mercurial, but they make life easier on bitbucket it seems). Then, hit "branches," select the branch with your fixes, and then "<- send pull request". It works pretty much the same way on github, except we have the network graph to help us out even more.
Image

Christian Walther
Member
Posts: 294
Joined: Sat Dec 13, 2008 10:54 am

Re: Bitbucket Pull Requests Merged?

Post by Christian Walther » Sat Jan 28, 2012 12:55 am

Hoikas is on the right track with his advice, I think. The problem was that you committed the city book fix onto the same branch as previously the Er’cana elevator fix. You should have committed it on a separate branch, branching off from some revision that’s already in the upstream repository. For my cleaned-up version, I transplanted the fix into its own branch, choosing the latest upstream revision as the base. (I could also have chosen the same one as the Er’cana fix was based on.)

Apparently Bitbucket then noticed that there was already a pull request for the branch that you just committed on, and presented you with a big fat “update pull request” button. If you had been on a separate branch, that button wouldn’t have been there.

Note that one difference to GitHub is that there is no explicit “update pull request” button on GitHub, but pushing more commits onto the same branch automatically updates the pull request.

User avatar
D'Lanor
Member
Posts: 142
Joined: Tue Dec 23, 2008 11:23 pm

Re: Bitbucket Pull Requests Merged?

Post by D'Lanor » Sat Jan 28, 2012 2:33 pm

OK, so branching it is from now on. I never thought I would need that in my own repo since I am the only person committing to it and it seemed like a good idea to keep things simple. :?

User avatar
Hoikas
Member
Posts: 286
Joined: Fri Jun 03, 2011 8:38 pm

Re: Bitbucket Pull Requests Merged?

Post by Hoikas » Sun Jan 29, 2012 3:13 am

You do all of your work in a branch, which then gets integrated into the master/head/default branch of the upstream repository. You should probably leave the master/head/default branch as a clean representation of the upstream to facilitate diversion on your end. I know on git, it can get very complicated and ugly if you do all of your work in master itself.

EDIT: I just had my own issues with bitbucket and pull requests. Mercurial is very frustrating when it comes to branching :evil:
Image

Post Reply

Return to “Management”

Who is online

Users browsing this forum: No registered users and 1 guest