From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>,
Ian Campbell <ian.campbell@citrix.com>
Subject: [OSSTEST PATCH] Default vcs to git
Date: Thu, 22 May 2014 12:31:57 +0100 [thread overview]
Message-ID: <1400758317-10517-1-git-send-email-ian.jackson@eu.citrix.com> (raw)
adhoc-revtuple-generator and cs-bisection-step try to guess the VCS
from the URL, by looking at the end of the URL for a suitable file
extension. If none was found, things would break.
This relies on a convention about tree URLs which is sadly no longer
being widely observed. In particular many projects have git URLs
which do not mention git.
Instead, have these scripts assume that urls which don't end in .git
or .hg are for git.
This renders hg into a second-class VCS in osstest, which is (I think)
tolerable. If it isn't, then someone ought to come up with some
better way of ensuring that the vcs is explicitly specified to
adhoc-revtuple-generator and cs-bisection-step. That would probably
be doable but is too much work right now.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
adhoc-revtuple-generator | 6 ++++++
cs-bisection-step | 4 ++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/adhoc-revtuple-generator b/adhoc-revtuple-generator
index 9efc3dc..56dec43 100755
--- a/adhoc-revtuple-generator
+++ b/adhoc-revtuple-generator
@@ -503,6 +503,12 @@ sub parse_trees () {
$tree->{Gen}= \&hg_generator;
$tree->{Show}= \&hg_revshower;
$tree->{Treename}= $1;
+ } elsif (m,([^/]+)$,) {
+ my $name= $1;
+ $name =~ s,\.[^.]+$,,;
+ $tree->{Gen}= \&git_generator;
+ $tree->{Show}= \&git_revshower;
+ $tree->{Treename}= $name;
} else {
die "unknown tree format $_ ?";
}
diff --git a/cs-bisection-step b/cs-bisection-step
index 07e8539..ca3b28a 100755
--- a/cs-bisection-step
+++ b/cs-bisection-step
@@ -358,8 +358,8 @@ END
my $basisvcs = $basisrmap->{$tree}{Url};
#print STDERR Dumper($failvcs, $basisvcs);
next unless defined $basisvcs;
- $failvcs=~ s/.*(\.\w+)$/$1/ or warn "$tryfail->{flight} $tree ";
- $basisvcs=~s/.*(\.\w+)$/$1/ or warn "$trybasisflight $tree ";
+ $failvcs =~ s/.*(\.git|\.hg)$/$1/ or $failvcs= 'git';
+ $basisvcs =~ s/.*(\.git|\.hg)$/$1/ or $basisvcs='git';
#print STDERR "COMPARE $failvcs $basisvcs\n";
push @bad, "$tree:<$failvcs>/<$basisvcs>"
if $failvcs ne $basisvcs;
--
1.7.10.4
reply other threads:[~2014-05-22 11:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1400758317-10517-1-git-send-email-ian.jackson@eu.citrix.com \
--to=ian.jackson@eu.citrix.com \
--cc=ian.campbell@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).