projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
swap <[]> and <{}> syntax
[ghc-hetmet.git]
/
sync-all
diff --git
a/sync-all
b/sync-all
index
06c183a
..
ac06af1
100755
(executable)
--- a/
sync-all
+++ b/
sync-all
@@
-142,13
+142,12
@@
sub parsePackages {
foreach (@repos) {
chomp;
$lineNum++;
foreach (@repos) {
chomp;
$lineNum++;
- if (/^([^# ]+) +([^ ]+) +([^ ]+) +([^ ]+) +([^ ]+)$/) {
+ if (/^([^# ]+) +([^ ]+) +([^ ]+) +([^ ]+)$/) {
my %line;
$line{"localpath"} = $1;
$line{"tag"} = $2;
$line{"remotepath"} = $3;
$line{"vcs"} = $4;
my %line;
$line{"localpath"} = $1;
$line{"tag"} = $2;
$line{"remotepath"} = $3;
$line{"vcs"} = $4;
- $line{"upstream"} = $5;
push @packages, \%line;
}
elsif (! /^(#.*)?$/) {
push @packages, \%line;
}
elsif (! /^(#.*)?$/) {
@@
-198,7
+197,6
@@
sub scmall {
my $tag;
my $remotepath;
my $scm;
my $tag;
my $remotepath;
my $scm;
- my $upstream;
my $line;
my $branch_name;
my $subcommand;
my $line;
my $branch_name;
my $subcommand;
@@
-252,7
+250,6
@@
sub scmall {
$tag = $$line{"tag"};
$remotepath = $$line{"remotepath"};
$scm = $$line{"vcs"};
$tag = $$line{"tag"};
$remotepath = $$line{"remotepath"};
$scm = $$line{"vcs"};
- $upstream = $$line{"upstream"};
# Check the SCM is OK as early as possible
die "Unknown SCM: $scm" if (($scm ne "darcs") and ($scm ne "git"));
# Check the SCM is OK as early as possible
die "Unknown SCM: $scm" if (($scm ne "darcs") and ($scm ne "git"));
@@
-310,20
+307,14
@@
sub scmall {
if (-d "$localpath/.git") {
die "Found both _darcs and .git in $localpath";
}
if (-d "$localpath/.git") {
die "Found both _darcs and .git in $localpath";
}
- else {
- $scm = "darcs";
- }
- }
- else {
- if (-d "$localpath/.git") {
- $scm = "git";
- }
- elsif ($tag eq "") {
- die "Required repo $localpath is missing";
- }
- else {
- message "== $localpath repo not present; skipping";
- }
+ $scm = "darcs";
+ } elsif (-d "$localpath/.git") {
+ $scm = "git";
+ } elsif ($tag eq "") {
+ die "Required repo $localpath is missing";
+ } else {
+ message "== $localpath repo not present; skipping";
+ next;
}
# Work out the arguments we should give to the SCM
}
# Work out the arguments we should give to the SCM
@@
-372,6
+363,9
@@
sub scmall {
my @scm_args = ("log", "$branch_name..");
scm ($localpath, $scm, @scm_args, @args);
}
my @scm_args = ("log", "$branch_name..");
scm ($localpath, $scm, @scm_args, @args);
}
+ elsif ($command =~ /^log$/) {
+ scm ($localpath, $scm, "log", @args);
+ }
elsif ($command =~ /^remote$/) {
my @scm_args;
if ($subcommand eq 'add') {
elsif ($command =~ /^remote$/) {
my @scm_args;
if ($subcommand eq 'add') {
@@
-383,12
+377,22
@@
sub scmall {
}
scm ($localpath, $scm, @scm_args, @args);
}
}
scm ($localpath, $scm, @scm_args, @args);
}
+ elsif ($command =~ /^checkout$/) {
+ # Not all repos are necessarily branched, so ignore failure
+ $ignore_failure = 1;
+ scm ($localpath, $scm, "checkout", @args)
+ unless $scm eq "darcs";
+ }
elsif ($command =~ /^grep$/) {
# Hack around 'git grep' failing if there are no matches
$ignore_failure = 1;
scm ($localpath, $scm, "grep", @args)
unless $scm eq "darcs";
}
elsif ($command =~ /^grep$/) {
# Hack around 'git grep' failing if there are no matches
$ignore_failure = 1;
scm ($localpath, $scm, "grep", @args)
unless $scm eq "darcs";
}
+ elsif ($command =~ /^clean$/) {
+ scm ($localpath, $scm, "clean", @args)
+ unless $scm eq "darcs";
+ }
elsif ($command =~ /^reset$/) {
scm ($localpath, $scm, "reset", @args)
unless $scm eq "darcs";
elsif ($command =~ /^reset$/) {
scm ($localpath, $scm, "reset", @args)
unless $scm eq "darcs";
@@
-425,9
+429,12
@@
Supported commands:
* remote add <branch-name>
* remote rm <branch-name>
* remote set-url [--push] <branch-name>
* remote add <branch-name>
* remote rm <branch-name>
* remote set-url [--push] <branch-name>
+ * checkout
* grep
* grep
+ * clean
* reset
* config
* reset
* config
+ * log
Available package-tags are:
END
Available package-tags are:
END