Bug#878798: lintian: Please accept and recommend new vcs-mtn mtn:// uri format
Package: lintian
Severity: wishlist
Tags: patch
The monotone version control system has deprecated the
"mtn host branch" syntax for years.
We should recommend the new "mtn mtn://host?branch" instead.
Please consider the attached suggestion when checking the VCS-Mtn
control field.
--- a/checks/fields.pm
+++ b/checks/fields.pm
@@ -114,8 +114,8 @@ my %VCS_EXTRACT = (
# git uri followed by optional " -b " + branchname:
git => sub { return shift =~ /^(.+?)(?:\s+-b\s+(\S*))?$/;},
svn => sub { return @_;},
- # that's a hostname followed by a module name:
- mtn => sub { return shift =~ /^(.+?)\s+(\S+)$/;},
+ # New "mtn://host?branch" uri or deprecated "host branch".
+ mtn => sub { return shift =~ /^(.+?)(?:\s+\S+)?$/;},
);
my %VCS_CANONIFY = (
browser => sub {
@@ -195,7 +195,7 @@ my %VCS_RECOMMENDED_URIS = (
hg => qr;^https?://;,
git => qr;^(?:git|https?|rsync)://;,
svn => qr;^(?:svn|(?:svn\+)?https?)://;,
- mtn => qr;^[\w.-]+$;,
+ mtn => qr;^mtn://;,
);
my %VCS_VALID_URIS = (
arch => qr;^https?://;,
@@ -204,6 +204,7 @@ my %VCS_VALID_URIS = (
hg => qr;^ssh://;,
git => qr;^(?:git\+)?ssh://|^[\w.]+@[a-zA-Z0-9.]+:[/a-zA-Z0-9.];,
svn => qr;^(?:svn\+)?ssh://;,
+ mtn => qr;^[\w.-]+$;,
);
# Python development packages that are used almost always just for building
--- a/t/tests/fields-uncanonical-vcs-fields/debian/debian/control.in
+++ b/t/tests/fields-uncanonical-vcs-fields/debian/debian/control.in
@@ -6,7 +6,7 @@ Standards-Version: {$standards_version}
Build-Depends: {$build_depends}
Vcs-Browser: https://svn.debian.org/wsvn/foobar/trunk?foo=bar;op=log;something=else
Vcs-Svn: svn://svn.debian.org/svn/foobar/trunk
-Vcs-Mtn: www.example.org org.debian.foobar
+Vcs-Mtn: mtn://www.example.org?org.debian.foobar
Vcs-Hg: http://hg.debian.org/hg/foobar/pkg/foobar
Vcs-Git: git://git.debian.org/~djpig/foobar.git -b master
Vcs-Cvs: :pserver:anonymous@cvs.alioth.debian.org:/cvsroot/foobar module
--- a/t/tests/fields-vcs-fields/desc
+++ b/t/tests/fields-vcs-fields/desc
@@ -5,9 +5,9 @@ Test-Against:
vcs-field-bitrotted
vcs-field-has-unexpected-spaces
vcs-field-not-canonical
- vcs-field-uses-not-recommended-uri-format
vcs-field-uses-unknown-uri-format
vcs-git-uses-invalid-user-uri
Test-For:
vcs-field-uses-insecure-uri
+ vcs-field-uses-not-recommended-uri-format
vcs-browser-links-to-empty-view
--- a/t/tests/fields-vcs-fields/tags
+++ b/t/tests/fields-vcs-fields/tags
@@ -2,3 +2,4 @@ I: fields-vcs-fields source: vcs-field-uses-insecure-uri vcs-bzr nosmart+http://
I: fields-vcs-fields source: vcs-field-uses-insecure-uri vcs-cvs :pserver:anonymous@anonscm.debian.org:/cvs/foobar module
I: fields-vcs-fields source: vcs-field-uses-insecure-uri vcs-svn svn://anonscm.debian.org/foobar/trunk
W: fields-vcs-fields source: vcs-browser-links-to-empty-view https://anonscm.debian.org/viewvc/foobar/trunk?rev=0&sc=0
+W: fields-vcs-fields source: vcs-field-uses-not-recommended-uri-format vcs-mtn www.example.org org.debian.foobar
Reply to: