dimagi/commcare-hq — pull request #2621 by dannyroberts (2014-02-25 19:33:54+00:00)
Title: have rebuildstaging show more details on a conflict

- when there is a merge conflict rebuildstaging will find the
first commit on each branch that prevents the other from being
merged in
- this functionality is also accessible as a separate script:
$ python scripts/gitutils.py show-conflict
- reusable git-related utilities are now in scripts/gitutils.py
- added OriginalBranch context manager that makes sure you end up
on the branch you started out on, even if the code block
throws an exception
- use OriginalBranch throughout to improve the experience of
rebuildstaging
- git_current_branch now returns either a branch or a commit if not on
any branch