openmicroscopy/snoopycrimecop — pull request #153 by sbesson (2014-03-24 14:27:13+00:00)
Title: Add first implementation of branch tracking in `scc merge`

This PR is the first implementation of a feature allowing scc to include remote branches not opened as PRs into the `scc merge` operation:
- branch inclusion is specified via an include filter under the form `-I user/repo:branch` e.g.

```
sebastien@sbesson:bioformats (dev_5_0) $ python ~/code/ome/snoopycrimecop/scc/main.py merge dev_5_0 --info -I melissalinkert/bioformats:micromanager
2014-03-24 14:12:38,257 [ scc.merge] INFO Listing Pull Request(s) based on dev_5_0
2014-03-24 14:12:38,257 [ scc.merge] INFO Including Pull Request(s) opened by any public member of the organization
2014-03-24 14:12:38,257 [ scc.merge] INFO Including melissalinkert/bioformats Branches(s)/Pull Request(s) micromanager
2014-03-24 14:12:38,257 [ scc.merge] INFO Including Pull Request(s) labelled as include
2014-03-24 14:12:38,257 [ scc.merge] INFO Excluding Pull Request(s) labelled as exclude or breaking
2014-03-24 14:13:02,895 [ scc.merge] INFO Repository: openmicroscopy/bioformats
2014-03-24 14:13:02,896 [ scc.merge] INFO Candidate PRs:
2014-03-24 14:13:02,896 [ scc.merge] INFO # PR 915 imunro 'Fix for single channel meas_mode 13 data.'
2014-03-24 14:13:02,896 [ scc.merge] INFO # PR 946 melissalinkert 'Read internal pyramids from CellSens .vsi data'
2014-03-24 14:13:02,896 [ scc.merge] INFO # PR 951 ctrueden 'Fix up Bio-Formats POMs'
2014-03-24 14:13:02,896 [ scc.merge] INFO # PR 952 melissalinkert 'Memoization fixes'
2014-03-24 14:13:02,896 [ scc.merge] INFO # PR 960 melissalinkert 'Cache OME-XML between ImagePluses (rebased onto dev_5_0)'
2014-03-24 14:13:02,896 [ scc.merge] INFO # PR 972 melissalinkert 'CZI: restrict dimension adjustment'
2014-03-24 14:13:02,896 [ scc.merge] INFO # PR 979 melissalinkert 'SVS import and TIFF export fixes'
2014-03-24 14:13:02,896 [ scc.merge] INFO # PR 984 melissalinkert 'Enable SDT plane preloading by default'
2014-03-24 14:13:02,896 [ scc.merge] INFO Candidate Branches:
2014-03-24 14:13:02,896 [ scc.merge] INFO # melissalinkert:micromanager
2014-03-24 14:13:02,896 [ scc.merge] INFO
```

- the candidate branches are simply stored as a dictionary of key/values `'remote': ['branch1', 'branch2']`. Depending on the future needs, we may want to evolve towards a more complex object, e.g. a wrapper of [Branch](http://jacquev6.github.io/PyGithub/v1/github_objects/Branch.html)
- `scc merge --info` should now also list the candidate branches as shown above
- merging should follow the same behavior as for `scc merge` i.e. sequential with a fallback to the pre-merge SHA1 in case of conflict. All merged and conflicting branches should be included in the commit message.
- PRs are currently merged before branches and the order of merging for branches is still unspecified at the moment. Happy to have thoughts about this
- the `test_merge.py` integration tests are now split into 2 concrete classes: one for PR merging, one for branch merging. A simple test should be run that pushes a branch to the fork of `snoopy-sandbox` and runs the merge operation.

/cc @chris-allan, @melissalinkert