[jbossts-issues] [JBoss JIRA] (JBTM-1617) When testing pull requests do a rebase to the merge point
Gytis Trikleris (JIRA)
jira-events at lists.jboss.org
Wed Apr 10 08:04:12 EDT 2013
[ https://issues.jboss.org/browse/JBTM-1617?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gytis Trikleris updated JBTM-1617:
----------------------------------
Status: Pull Request Sent (was: Coding In Progress)
Git Pull Request: https://github.com/jbosstm/narayana/pull/264, https://github.com/jbosstm/narayana/pull/265
> When testing pull requests do a rebase to the merge point
> ---------------------------------------------------------
>
> Key: JBTM-1617
> URL: https://issues.jboss.org/browse/JBTM-1617
> Project: JBoss Transaction Manager
> Issue Type: Task
> Security Level: Public(Everyone can see)
> Components: Build System
> Reporter: Tom Jenkinson
> Assignee: Gytis Trikleris
> Priority: Critical
> Fix For: 4.17.4, 5.0.0.M3
>
>
> These instructions can go in the pull job config rather than narayana.sh I think as they do a full clean and that would be dangerous on a dev box
> # Clean up the local repo
> git rebase --abort
> rm -rf .git/rebase-apply
> git clean -f -d -x
> # Work out the branch point
> git branch -D 4.17
> git branch 4.17 origin/4.17
> git branch -D master
> git branch master origin/master
> myRev=`git rev-parse HEAD`
> ancestor417=`git merge-base $myRev 4.17`
> ancestorMaster=`git merge-base $myRev master`
> distanceFromMaster=`git log $ancestorMaster..$myRev | grep commit | wc | cut -c 1-7 | tr -d ' '`
> distanceFrom417=`git log $ancestor417..$myRev | grep commit | wc | cut -c 1-7 | tr -d ' '`
> if [ "$distanceFromMaster" -lt "$distanceFrom417" ]
> then
> export BRANCHPOINT=master
> else
> export BRANCHPOINT=4.17
> fi
> # Update the pull to head
> git pull --rebase --ff-only origin $BRANCHPOINT
> # if this fails ($? -ne 0) fail the build and tell the committer (commentOnPull) that they need to rebase
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jbossts-issues
mailing list