Bug 574454 - Cleanup nsNativeThemeWin's GetMinimumWidgetSize a bit. r=roc.
[mozilla-central.git] / config / cvsco-fast-update.pl
blobdb3e4831ce9dae27e6ab12cd101c96c5b62104e3
1 #!/usr/bin/env perl
3 # cvsco-fast-update.pl cvs co ...
5 # This command parses a "cvs co ..." command and converts it to
6 # fast-update.pl commands
8 use Getopt::Long;
10 my $filename = ".fast-update";
11 my $start_time = time();
13 my $branch;
14 my @modules;
15 my @dirs;
16 my $dirlocal = 0;
18 print "$0: (".join(')(',@ARGV).")\n";
19 while (scalar(@ARGV)) {
20 my $val = shift(@ARGV);
21 if ( ($val eq '-A') || ($val eq 'co') || ($val eq 'cvs')
22 || ($val eq '-P') || ($val eq '-q')) {
23 #print "ignore $val\n";
24 next;
26 elsif (($val eq '-d') || ($val eq '-q') || ($val eq '-z')) {
27 my $tmp = shift @ARGV;
28 #print "ignore $val $tmp\n";
29 next;
31 elsif ($val eq '-r') {
32 $branch = shift @ARGV;
33 #print "branch = $branch\n";
34 next;
36 elsif ($val eq '-l') {
37 $dirlocal = 1;
38 #print "dirlocal = $dirlocal\n";
39 next;
41 elsif ($val =~ /^-/) {
42 print "*** unknown switch: $val\n";
43 exit 1;
46 if ($val =~ /\//) {
47 push @dirs, $val;
48 #print "dir = $val\n";
50 else {
51 push @modules, $val;
52 #print "module = $val\n";
56 #print "dir = (".join(')(', @dirs)."), "
57 # . "module = (".join(')(', @modules)."), "
58 # . "branch = ($branch)\n";
60 if (!$branch) {
61 $branch = 'HEAD';
64 my $status = 0;
65 foreach my $mod (@modules) {
66 my $cmd = "config/fast-update.pl -r $branch -m $mod" . ($dirlocal ? " -l" : "");
67 #print "system \"$cmd\"\n";
68 $status |= system $cmd;
70 my $dirlist = join(' -d ', @dirs);
71 my $cmd = "config/fast-update.pl -r $branch -d $dirlist -m all" . ($dirlocal ? " -l" : "");
72 #print "system \"$cmd\"\n";
73 $status |= system $cmd;
75 exit $status;