From 6be5332d24efc7a21c9b5c57ad30193badb16ff2 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 21 Jun 2018 14:11:10 +0100 Subject: 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 --- debian/changelog | 2 ++ dgit | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/debian/changelog b/debian/changelog index 6bc6173..2efcc9c 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 48fd4f4..2365bfc 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 <