Bug 3017 - bake should check branch state before git rebase
bake should check branch state before git rebase
Product: bake
Classification: Unclassified
Component: bake
PC Linux
: P5 normal
Assigned To: ns-bugs
Depends on:
  Show dependency treegraph
Reported: 2018-11-19 22:38 EST by Tom Henderson
Modified: 2018-11-19 22:39 EST (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Tom Henderson 2018-11-19 22:38:49 EST
./bake.py configure -e dce-umip-dev && ./bake.py download && ./bake.py update

will fail because dce-umip-dev checks out an older revision of the tree, leaving the repository in detached head state.  bake update will try to stash local changes and rebase, but the rebase operation will fail.

bake could be smarter and check the branch status before attempting a rebase.  

$ git status --branch --porcelain
will return the string 'HEAD (no branch)' if in this state.

However, bake doesn't have an easy way to check this using existing ModuleEnvironment methods, so some other method that calls subprocess.Popen () to check this may be needed.