[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH] build_clone: When guessing vcs from url suffix, strip cache info
We assume that anything not containing `/'s after `%20' is uninteresting. Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> --- 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 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |