* [OSSTEST PATCH] build_clone: When guessing vcs from url suffix, strip cache info
@ 2014-06-05 11:11 Ian Jackson
0 siblings, 0 replies; 2+ messages in thread
From: Ian Jackson @ 2014-06-05 11:11 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Jackson, Ian Campbell
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [OSSTEST PATCH] build_clone: When guessing vcs from url suffix, strip cache info
@ 2014-06-05 10:17 Ian Jackson
0 siblings, 0 replies; 2+ messages in thread
From: Ian Jackson @ 2014-06-05 10:17 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Jackson, Ian Campbell
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-06-05 11:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-05 11:11 [OSSTEST PATCH] build_clone: When guessing vcs from url suffix, strip cache info Ian Jackson
-- strict thread matches above, loose matches on Subject: below --
2014-06-05 10:17 Ian Jackson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.