From: Ian Jackson Date: Thu, 21 Jun 2018 13:11:10 +0000 (+0100) Subject: dgit: warn if vcs-git seems out of date X-Git-Tag: archive/debian/5.2~5 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;ds=sidebyside;h=6be5332d24efc7a21c9b5c57ad30193badb16ff2;p=dgit.git dgit: warn if vcs-git seems out of date Print a warning to stderr on `dgit fetch sid', if your vcs-git remote url disagrees with what's in sid's .dsc. Signed-off-by: Ian Jackson --- diff --git a/debian/changelog b/debian/changelog index 6bc61735..2efcc9cc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -24,6 +24,8 @@ dgit (5.2~) unstable; urgency=medium * Provide `update-vcs-git' subcommand, for creating and adjusting the vcs-git remote url. Useful for transition from alioth to salsa. Closes:#902006. + * Print a warning to stderr on `dgit fetch sid', if your vcs-git + remote url disagrees with what's in sid's .dsc. test suite: * Use nproc(1) rather than Sys::CPU. This is more portable and does not diff --git a/dgit b/dgit index 48fd4f48..2365bfce 100755 --- a/dgit +++ b/dgit @@ -3722,6 +3722,20 @@ sub fetch () { git_fetch_us(); } fetch_from_archive() or no_such_package(); + + my $vcsgiturl = $dsc && $dsc->{'Vcs-Git'}; + if (length $vcsgiturl and + (grep { $csuite eq $_ } + split /\;/, + cfg 'dgit.vcs-git.suites')) { + my $current = cfg 'remote.vcs-git.url', 'RETURN-UNDEF'; + if (defined $current && $current ne $vcsgiturl) { + print STDERR <