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] build_clone: When guessing vcs from url suffix, strip cache info
Date: Thu, 5 Jun 2014 11:17:01 +0100 [thread overview]
Message-ID: <1401963421-6551-1-git-send-email-ian.jackson@eu.citrix.com> (raw)
We assume that anything not containing `/'s after `%20' is
uninteresting.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
Osstest/TestSupport.pm | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 4187b6c..93c8fcf 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -1045,13 +1045,16 @@ sub build_clone ($$$$) {
my $timeout= 4000;
my $vcs = $r{"treevcs_$which"};
- if (defined $vcs) {
- } elsif ($tree =~ m/\.hg$/) {
- $vcs= 'hg';
- } elsif ($tree =~ m/\.git$/) {
- $vcs= 'git';
- } else {
- die "unknown vcs for $which $tree ";
+ if (!defined $vcs) {
+ my $effurl = $tree;
+ $effurl =~ s#\%20[^/]*$##;
+ if ($effurl =~ m/\.hg$/) {
+ $vcs= 'hg';
+ } elsif ($effurl =~ m/\.git$/) {
+ $vcs= 'git';
+ } else {
+ die "unknown vcs for $which $tree ";
+ }
}
if ($vcs eq 'hg') {
--
1.7.10.4
next reply other threads:[~2014-06-05 10:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-05 10:17 Ian Jackson [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-06-05 11:11 [OSSTEST PATCH] build_clone: When guessing vcs from url suffix, strip cache info Ian Jackson
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=1401963421-6551-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).