CWS-TOOLING: integrate CWS vgbugs11
This commit is contained in:
commit
536b9a5729
3 changed files with 27 additions and 11 deletions
|
@ -670,7 +670,9 @@ sub build_all {
|
|||
prepare_build_from_with_branches(\%global_deps_hash, \%reversed_full_deps_hash);
|
||||
}
|
||||
if ($build_all_cont || $build_since) {
|
||||
store_weights(\%global_deps_hash);
|
||||
prepare_build_all_cont(\%global_deps_hash);
|
||||
%weights_hash = ();
|
||||
};
|
||||
if ($generate_config) {
|
||||
%add_to_config = %global_deps_hash;
|
||||
|
@ -1322,7 +1324,10 @@ sub find_indep_prj {
|
|||
$Dependencies = shift;
|
||||
if (scalar keys %$Dependencies) {
|
||||
foreach my $job (keys %$Dependencies) {
|
||||
push(@candidates, $job) if (!scalar keys %{$$Dependencies{$job}});
|
||||
if (!scalar keys %{$$Dependencies{$job}}) {
|
||||
push(@candidates, $job);
|
||||
last if (!$processes_to_run);
|
||||
};
|
||||
};
|
||||
if (scalar @candidates) {
|
||||
$all_dependent = 0;
|
||||
|
|
|
@ -43,7 +43,7 @@ use File::Spec;
|
|||
|
||||
( $script_name = $0 ) =~ s/^.*\b(\w+)\.pl$/$1/;
|
||||
|
||||
$id_str = ' $Revision$ ';
|
||||
$id_str = ' $Revision: 275594 $ ';
|
||||
$id_str =~ /Revision:\s+(\S+)\s+\$/
|
||||
? ($script_rev = $1) : ($script_rev = "-");
|
||||
|
||||
|
@ -404,6 +404,8 @@ sub parse_options
|
|||
{
|
||||
my $arg;
|
||||
my $dontdeletecommon = 0;
|
||||
$opt_silent = 1 if ( defined $ENV{VERBOSE} && $ENV{VERBOSE} eq 'FALSE');
|
||||
$opt_verbose = 1 if ( defined $ENV{VERBOSE} && $ENV{VERBOSE} eq 'TRUE');
|
||||
while ( $arg = shift @ARGV ) {
|
||||
$arg =~ /^-force$/ and $opt_force = 1 and next;
|
||||
$arg =~ /^-check$/ and $opt_check = 1 and $opt_verbose = 1 and next;
|
||||
|
@ -423,15 +425,13 @@ sub parse_options
|
|||
}
|
||||
$dest = $arg;
|
||||
}
|
||||
$opt_silent = 1 if ( !defined $ENV{VERBOSE} || (defined $ENV{VERBOSE} && $ENV{VERBOSE} eq 'FALSE')) && ( ! $opt_verbose );
|
||||
$opt_verbose = 1 if ( defined $ENV{VERBOSE} && $ENV{VERBOSE} eq 'TRUE') && ( ! $opt_silent );
|
||||
# $dest and $opt_zip or $opt_delete are mutually exclusive
|
||||
if ( $dest and ($opt_zip || $opt_delete) ) {
|
||||
usage(1);
|
||||
}
|
||||
# $opt_silent and $opt_check or $opt_verbose are mutually exclusive
|
||||
if ( ($opt_check or $opt_verbose) and $opt_silent ) {
|
||||
print STDERR "Error on command line: options '-check'/'-verbose' and '-quiet' are mutually exclusive.\n";
|
||||
print STDERR "Error on command line: options '-check' and '-quiet' are mutually exclusive.\n";
|
||||
usage(1);
|
||||
}
|
||||
if ($dontdeletecommon) {
|
||||
|
@ -679,6 +679,12 @@ sub glob_line
|
|||
}
|
||||
else {
|
||||
# no globbing but renaming possible
|
||||
# #i89066#
|
||||
if (-d $to && -f $from) {
|
||||
my $filename = File::Basename::basename($from);
|
||||
$to .= '/' if ($to !~ /[\\|\/]$/);
|
||||
$to .= $filename;
|
||||
};
|
||||
push(@globbed_files, [$from, $to]);
|
||||
}
|
||||
if ( $opt_checkdlst ) {
|
||||
|
|
|
@ -118,21 +118,26 @@ sub search_for_hg {
|
|||
|
||||
sub search_via_build_lst {
|
||||
my $self = shift;
|
||||
my @possible_build_lists = ('build.lst', 'build.xlist'); # build lists names
|
||||
# my @possible_build_lists = ('build.lst', 'build.xlist'); # build lists names
|
||||
my @possible_build_lists = ('build.lst'); # build lists names
|
||||
my $previous_dir = '';
|
||||
my $rep_root_candidate = $self->{INITIAL_DIRECTORY};
|
||||
do {
|
||||
foreach (@possible_build_lists) {# ('build.lst', 'build.xlist');
|
||||
if (-e $rep_root_candidate . '/prj/'.$_) {
|
||||
foreach (@possible_build_lists) {
|
||||
my $test_file;
|
||||
if ($rep_root_candidate eq '/') {
|
||||
$test_file = '/prj/' . $_;
|
||||
} else {
|
||||
$test_file = $rep_root_candidate . '/prj/' . $_;
|
||||
};
|
||||
if (-e $test_file) {
|
||||
$self->{REPOSITORY_ROOT} = File::Basename::dirname($rep_root_candidate);
|
||||
return 1;
|
||||
} elsif ($rep_root_candidate eq $previous_dir) {
|
||||
return 0;
|
||||
};
|
||||
};
|
||||
$previous_dir = $rep_root_candidate;
|
||||
$rep_root_candidate = File::Basename::dirname(Cwd::realpath($rep_root_candidate));
|
||||
return 0 if (!$rep_root_candidate);
|
||||
return 0 if ((!$rep_root_candidate) || ($rep_root_candidate eq $previous_dir));
|
||||
}
|
||||
while (chdir "$rep_root_candidate");
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue