Package: qa.debian.org

https://qa.debian.org/cgi-bin/vcswatch?package=adequate says:
VCS is behind the version in the archive: 0.15.1~bpo8+1 < 0.15.1. Looks like someone forgot to push their changes!

I didn't forget anything. :) vcswatch passes "-rtip" to hg, but "tip" means the most recent revision on any branch. Instead, it should use the "default" branch or the branch explicitly specified in the URL.

I've attached untested patch.

--
Jakub Wilk
Index: data/vcswatch/vcswatch
===================================================================
--- data/vcswatch/vcswatch	(revision 3475)
+++ data/vcswatch/vcswatch	(working copy)
@@ -208,6 +208,7 @@
 			@cmd = ('git', 'clone', '--bare', '--mirror', $url, $pkgdir);
 		} elsif ($pkg->{vcs} eq 'Hg') {
 			error ("Invalid hg URL: $url") unless ($url =~ /^\w\S+$/);
+			($branch) = $url =~ /#(\S+)$/;
 			@cmd = ('hg', 'clone', '--noupdate', '--insecure', $url, $pkgdir);
 		} elsif ($pkg->{vcs} eq 'Mtn') {
 			@cmd = ('mtn', 'clone');
@@ -270,6 +271,7 @@
 			}
 		} elsif ($pkg->{vcs} eq 'Hg') {
 			@cmd = ('hg', 'pull', '--insecure');
+			($branch) = $url =~ /#(\S+)$/;
 		} elsif ($pkg->{vcs} eq 'Mtn') {
 			@cmd = ('mtn', 'pull');
 		} elsif ($pkg->{vcs} eq 'Svn') {
@@ -316,7 +318,7 @@
 		defined ($branch) or error ("debian/changelog not found in HEAD, debian, and master");
 
 	} elsif ($pkg->{vcs} eq 'Hg') {
-		$changelog = runcmd ('hg', 'cat', '-rtip', "debian/changelog");
+		$changelog = runcmd ('hg', 'cat', '-r', ($branch // 'default'), "debian/changelog");
 		$changelog =~ s/(^ -- [^\n]*).*/$1/ms; # reduce to first entry
 
 	} else {

Reply via email to