]> xenbits.xensource.com Git - osstest.git/commitdiff
Default vcs to git flight-26417 flight-26419 flight-26420 flight-26421 flight-26422 flight-26423 flight-26425 flight-26427 flight-26428 flight-26429 flight-26430 flight-26431 flight-26433 flight-26434 flight-26437 flight-26449 flight-26450 flight-26451 flight-26454 flight-26455 flight-26457 flight-26458 flight-26460 flight-26461 flight-26462 flight-26464 flight-26465 flight-26466 flight-26468 flight-26469 flight-26470 flight-26472 flight-26473 flight-26475 flight-26476 flight-26477 flight-26478 flight-26479 flight-26480 flight-26481 flight-26482 flight-26485 flight-26489 flight-26490 flight-26491
authorIan Jackson <ian.jackson@eu.citrix.com>
Thu, 22 May 2014 11:24:19 +0000 (12:24 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 22 May 2014 11:30:18 +0000 (12:30 +0100)
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
cs-bisection-step

index 9efc3dc8877a0c00cc14dd33e8ad2c7df8baa804..56dec431a4ecbabf8c7ffb2328090b13211da44f 100755 (executable)
@@ -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 $_ ?";
         }
index 07e8539cddf2dce6f6f0afa3ccd9db1ca3a7884e..ca3b28ac4a292deec3ad25ec15145b0933251a53 100755 (executable)
@@ -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;