Merging BitBucket Pull Requests

Basic process

 

  1. Navigate to https://open-bitbucket.nrao.edu/projects/CASA/repos/casa/pull-requests.

 

 

Pull Request Screen

 

2. Select an open pull request.

3. Read the overview for the change. Pay attention to whether this change includes a Casacore update

4. View the changes in the "Diff" tab. If the ticket didn't indicate a change to Casacore, there should be no indication of submodule update. If there is proceed to "Submodules" section of this document.

5. View the changes in the "commit" tab. Verify that there are no extra or excessive commits. These are typically a sign that there are issues with the branch history.

6. Make sure that the little green check box is checked and the mouse-over says "this change can be merged".

7. Click Merge

Submodules

 If the submodule is out of sync, but the merge looks otherwise fine, do the following on your local machine:

Clone the repository

cd to your repository copy

git checkout master

git pull

git submodule update

git checkout

git add casacore

git commit

git push origin

This should update the reference in the pull request to the  correct version. Remember that you can alway use "git submodule" to view the current submodule status.

Reverting a change

A bad merge can be reverted with "git revert". This won't undo the merge, but rather add another commit which reverses the changes.

git checkout master

git pull

git submodule update

git branch

git checkout

git revert -m1 #m1 is trunk the trunk parent m2 is the branch parent

git push origin

 

Viewing merge parents

To view merge commit parents execute "git show "

The "Merge:" field in teh above commit shows the the two merge parent commits

Viewing the history reveals that 5066bb520 was the master parent and d1655113a was the branch parent