diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2014-08-08 23:05:13 +0100 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2014-08-12 11:00:29 +0100 |
commit | 6c9a5d65d615abf75e640f5ceda332ef42854d57 (patch) | |
tree | 382deb1ed959ed5f9e682bacd13b198ba5a95388 /morphlib/builder2.py | |
parent | 54e03f2e5005775c8e8c434094256feccd91c488 (diff) | |
download | morph-6c9a5d65d615abf75e640f5ceda332ef42854d57.tar.gz |
Avoid creating and pushing temporary build branches when they aren't necessary.
Sorry about the big lump, I can split it into a nicer set of changes,
but they didn't naturally emerge in a nice series.
This creates a pushed_build_branch context manager, to eliminate code
duplication between build and deploy.
Rather than the build branch being constructed knowing whether it needs
to push the branch, it infers that from the state of the repositories,
and whether a local build would be possible.
If there are no uncommitted changes and all local branches are pushed,
then it doesn't create temporary branches or push them, and instead uses
what it already has.
It will currently create and use temporary build branches even for
chunks that have no local changes, but it's pretty cheap, and doesn't
require re-working the build-ref injection code to check whether there
are local changes.
Diffstat (limited to 'morphlib/builder2.py')
0 files changed, 0 insertions, 0 deletions