Uploaded image for project: 'JBoss Transaction Manager'
  1. JBoss Transaction Manager
  2. JBTM-1617

When testing pull requests do a rebase to the merge point

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • Critical
    • 4.17.4, 5.0.0.M3
    • None
    • Build System
    • None

    Description

      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

      1. Clean up the local repo
        git rebase --abort
        rm -rf .git/rebase-apply
        git clean -f -d -x
      1. 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
      1. Update the pull to head
        git pull --rebase --ff-only origin $BRANCHPOINT
      2. if this fails ($? -ne 0) fail the build and tell the committer (commentOnPull) that they need to rebase

      Attachments

        Activity

          People

            gtrikler@redhat.com Gytis Trikleris (Inactive)
            thjenkin@redhat.com Tom Jenkinson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 2 hours Original Estimate - 2 hours
                2h
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 30 minutes
                2h 30m