How to backport pull requests in Play

143 views
Skip to first unread message

Will Sargent

unread,
Jun 29, 2017, 1:03:15 PM6/29/17
to play-fram...@googlegroups.com
Hi all,

Now that Play 2.6.x is out, any bug fixes should be applied to master first, and then backported to the 2.6.x branch.

This is pretty simple if you have https://hub.github.com installed and have both environments out.

So, I have two branches up in my system:

USER=<your github id>
mkdir -p $HOME/work/playframework
cd $HOME/work/playframework
hub clone playframework/playframework master
cd master
hub fork $USER
git worktree add $HOME/work/playframework/2.6.x 2.6.x

And then, when you're ready to backport a PR, you can do the following:

#!/bin/bash

BRANCH=2.6.x
PR=$1;
cd $HOME/work/playframework/$BRANCH;
git checkout -b backport-$PR;

After you've applied the commits to the current branch, verified that there are no merge conflicts and run it through the test suite, you can go ahead and submit it:

git push $USER backport-$PR;
hub pull-request -b $BRANCH --browse;

That's it!

--
Will Sargent
Engineer, Lightbend, Inc.

Rich Dougherty

unread,
Jun 29, 2017, 2:54:01 PM6/29/17
to Will Sargent, play-fram...@googlegroups.com
Thanks Will, I never realised the power of hub!

--
You received this message because you are subscribed to the Google Groups "Play framework dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framework-dev+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Rich Dougherty
Engineer, Lightbend, Inc

Christian Schmitt

unread,
Jul 1, 2017, 8:55:49 AM7/1/17
to Play framework dev, will.s...@lightbend.com
oh that post is great, can we pin it to the dev mailing list?

Will Sargent (Lightbend)

unread,
Jul 1, 2017, 7:03:16 PM7/1/17
to Play framework dev, will.s...@lightbend.com
Done.

Also I realized that I am missing a step to ensure you have the latest HEAD of the branch.  After going to $BRANCH, you can make sure you're up to date with

git pull --rebase 

which should have the same effect as

git fetch origin
git rebase origin/$BRANCH

Koen De Groote

unread,
Aug 28, 2017, 2:21:48 PM8/28/17
to Play framework dev, will.s...@lightbend.com
Worked great for me, only thing I had to do differently was this line:

git worktree add $HOME/work/playframework/2.6.x 2.6.x

Had to become: git worktree add $HOME/work/playframework/2.6.x origin/2.6.x
Reply all
Reply to author
Forward
0 new messages