[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#816452: marked as done (vcswatch: should not use -rtip for Mercurial repos)



Your message dated Mon, 10 Oct 2016 14:41:53 +0000
with message-id <E1btbm5-000718-VD@moszumanska.debian.org>
and subject line qa.debian.org bug fixed in revision 3561
has caused the Debian Bug report #816452,
regarding vcswatch: should not use -rtip for Mercurial repos
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
816452: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=816452
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
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 {

--- End Message ---
--- Begin Message ---
Version: 3561

This bug was closed by Christoph Berg (myon) in SVN revision 3561.
Note that it might take some time until the qa.debian.org code has
been updated and cronjobs have picked up changed data.

Commit message:

Support branch-in-URL for Hg repos

By Jakub Wilk, Closes: #816452

--- End Message ---

Reply to: