diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2015-11-28 17:43:33 +0000 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-07-16 16:47:47 +0100 |
commit | 57b7ccba1b4e833e9ffc91efe0afe550138f530d (patch) | |
tree | d5f473939bb5faf6dc18071bf1b4a534b0fa660f /dgit | |
parent | 1d90ef8b49ccf6156953d7595d33680276a8e8c7 (diff) |
Split brain: some work on integration into the rest of dgit
* Move the fast forward die to where we will need to make the
synthetic commit, so that the tree equality check is done on the
thing we will actually push.
* Crash if we are trying to do split brain without split build.
(This should never happen.)
* Set split build if we need split brain.
Diffstat (limited to 'dgit')
-rwxr-xr-x | dgit | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -1988,10 +1988,14 @@ END my $format = getfield $dsc, 'Format'; printdebug "format $format\n"; + if (madformat($format)) { # user might have not used dgit build, so maybe do this now: commit_quilty_patch(); } + + die 'xxx fast forward (should not depend on quilt mode, but will always be needed if we did $split_brain)' if $split_brain; + check_not_dirty(); changedir $ud; progress "checking that $dscfn corresponds to HEAD"; @@ -2628,7 +2632,6 @@ END runcmd @git, qw(update-ref -m), $cachekey, "refs/$splitbraincache", $dgitview; - die 'xxx fast forward (should not depend on quilt mode, but will always be needed if we did $split_brain)'; changedir '.git/dgit/unpack/work'; } @@ -2865,6 +2868,8 @@ sub build_maybe_quilt_fixup () { quilt_fixup_multipatch($clogp, $headref, $upstreamversion); } + die 'bug' if $split_brain && !$need_split_build_invocation; + changedir '../../../..'; runcmd_ordryrun_local @git, qw(pull --ff-only -q .git/dgit/unpack/work master); @@ -3773,6 +3778,8 @@ if (!defined $quilt_mode) { $quilt_mode = $1; } +$need_split_build_invocation ||= quiltmode_splitbrain(); + if (!defined $cleanmode) { local $access_forpush; $cleanmode = access_cfg('clean-mode', 'RETURN-UNDEF'); |