summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2013-08-22 16:02:24 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2013-08-22 16:02:24 +0100
commit1bc2f3fe71efe5038e1d7e63ce04442aaaa3c501 (patch)
treeb1c7c7358747e2a9ad64e83cb40d6c28b3e66248 /dgit
parentb9c9a1f4bc7a38ea789a3e5ae7c8a8b80d74689a (diff)
Allow fetching when archive has out-of-date git hash in .dsc. Closes: #720490.debian/0.6
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit17
1 files changed, 16 insertions, 1 deletions
diff --git a/dgit b/dgit
index 8132b8f..4e9afe0 100755
--- a/dgit
+++ b/dgit
@@ -200,6 +200,10 @@ important dgit options:
-c<name>=<value> set git config option (used directly by dgit too)
END
+our $later_warning_msg = <<END;
+Perhaps the upload is stuck in incoming. Using the version from git.
+END
+
sub badusage {
print STDERR "$us: @_\n", $helpmsg or die $!;
exit 8;
@@ -565,9 +569,10 @@ END
$outputhash = make_commit qw(../commit2.tmp);
} elsif ($vcmp > 0) {
print STDERR <<END or die $!;
+
Version actually in archive: $cversion (older)
Last allegedly pushed/uploaded: $oversion (newer or same)
-Perhaps the upload is stuck in incoming. Using the version from git.
+$later_warning_msg
END
$outputhash = $upload_hash;
} elsif ($outputhash ne $upload_hash) {
@@ -651,6 +656,16 @@ sub fetch_from_archive () {
unless $upload_hash;
$hash = $dsc_hash;
ensure_we_have_orig();
+ if (is_fast_fwd($dsc_hash,$upload_hash)) {
+ print STDERR <<END or die $!;
+
+Git commit in archive is behind the last version allegedly pushed/uploaded.
+Commit referred to by archive: $dsc_hash
+Last allegedly pushed/uploaded: $upload_hash
+$later_warning_msg
+END
+ $hash = $upload_hash;
+ }
} else {
$hash = generate_commit_from_dsc();
}