Pull requests (bitbucket)

A place for Ogre users to discuss non-Ogre subjects with friends from the community.
Transporter
Minaton
Posts: 933
Joined: Mon Mar 05, 2012 11:37 am
Location: Germany
x 110

Pull requests (bitbucket)

Post by Transporter »

Hi,

I've a small problem with bitbucket. There are a few commits for ogitor in my fork and I like to create seperate pull-requests for each of them. How can I create seperate pull-requests? bitbucket always updates the last pull-request with all commits. I can find options to create a new one and select a specific commit.

Thanks for help,
Transporter
User avatar
AlexeyKnyshev
Goblin
Posts: 213
Joined: Sat May 26, 2012 10:37 am
Location: Russia
x 13

Re: Pull requests (bitbucket)

Post by AlexeyKnyshev »

Transporter wrote:Hi,

I've a small problem with bitbucket. There are a few commits for ogitor in my fork and I like to create seperate pull-requests for each of them. How can I create seperate pull-requests? bitbucket always updates the last pull-request with all commits. I can find options to create a new one and select a specific commit.

Thanks for help,
Transporter
You can make separate patches using version controll system.
Voltage Engine - boost your ogre project with realtime physics and interactive scripting!
OgreBullet & CMake - easy to use bullet physics integration.
Transporter
Minaton
Posts: 933
Joined: Mon Mar 05, 2012 11:37 am
Location: Germany
x 110

Re: Pull requests (bitbucket)

Post by Transporter »

AlexeyKnyshev wrote:You can make separate patches using version controll system.
Can you explain me how I can make separate patches?
User avatar
AlexeyKnyshev
Goblin
Posts: 213
Joined: Sat May 26, 2012 10:37 am
Location: Russia
x 13

Re: Pull requests (bitbucket)

Post by AlexeyKnyshev »

Transporter wrote:
AlexeyKnyshev wrote:You can make separate patches using version controll system.
Can you explain me how I can make separate patches?
I'm not a hg expert (git user) but allmost behavior is same. Look for "hg diff" documentation. You need sequence of patches between states (commits). So it will look like "hg diff %from_state% %to_state%".
Voltage Engine - boost your ogre project with realtime physics and interactive scripting!
OgreBullet & CMake - easy to use bullet physics integration.
Transporter
Minaton
Posts: 933
Joined: Mon Mar 05, 2012 11:37 am
Location: Germany
x 110

Re: Pull requests (bitbucket)

Post by Transporter »

AlexeyKnyshev wrote:I'm not a hg expert (git user) but allmost behavior is same. Look for "hg diff" documentation. You need sequence of patches between states (commits). So it will look like "hg diff %from_state% %to_state%".
This doesn't help me. I don't want want a patch file, I like to have a pull-request on bitbucket.
User avatar
AlexeyKnyshev
Goblin
Posts: 213
Joined: Sat May 26, 2012 10:37 am
Location: Russia
x 13

Re: Pull requests (bitbucket)

Post by AlexeyKnyshev »

Did you report your problem to atlassian? Try to figure out it with them? It looks like we haven't option to make sepatated pull requests on bitbucket (fix me, if it's wrong). So I have an idea but it quiet hard to implement with hg. You need to clone you repo from revision of your first commit:

hg clone --rev 5
hg update -r 5

Put your revision numbers instead 5.

Than make branch, commit/push and pull request.

Do it again for each commit.

It looks like lifehack, but it should work for you.

Best wishes, Alexey
Voltage Engine - boost your ogre project with realtime physics and interactive scripting!
OgreBullet & CMake - easy to use bullet physics integration.
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179

Re: Pull requests (bitbucket)

Post by jacmoe »

You can export your changes as 5 different patches, then clean your repository, create a branch, import the patch, issue a pull request, and move on to the next patch.
You can't separate it out because Mercurial works on the repository level, not the file level.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179

Re: Pull requests (bitbucket)

Post by jacmoe »

A great tip for pushing only the branch you're working on:
http://hgtip.com/tips/advanced/2009-09- ... tler-push/
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.