summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2016-07-17 00:12:35 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2016-07-17 13:46:14 +0100
commit1f80529a13489abd8606d95045d264733390903a (patch)
treedab237d32ee008bacadfeef2161c7a7c5d7fd8c2
parentc26f96c431c935b9cf8044fae9894bfdcadbbc97 (diff)
Split brain: When pushing, find the dgit view in the cache
We now do set $split_brain, and we don't do anythig with the cached dgit view, so we'll crash at the die, in a moment.
-rwxr-xr-xdgit17
1 files changed, 16 insertions, 1 deletions
diff --git a/dgit b/dgit
index f46e55a..d40a178 100755
--- a/dgit
+++ b/dgit
@@ -1999,7 +1999,22 @@ END
if (madformat($format)) {
# user might have not used dgit build, so maybe do this now:
- commit_quilty_patch();
+ if (quiltmode_splitbrain()) {
+ my $upstreamversion = $clogp->{Version};
+ $upstreamversion =~ s/-[^-]*$//;
+ changedir $ud;
+ quilt_make_fake_dsc($upstreamversion);
+ my ($dgitview, $cachekey) =
+ quilt_check_splitbrain_cache($head, $upstreamversion);
+ $dgitview or fail
+ "--quilt=$quilt_mode but no cached dgit view:
+ perhaps tree changed since dgit build[-source] ?";
+ $split_brain = 1;
+ changedir '../../../..';
+ prep_ud(); # so _only_subdir() works, below
+ } else {
+ 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;