X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=sync-all;h=8b41c97711ad3f2ea147af18984e3d65679b0ae2;hp=7ccc71d221650a8c0fba70b9310a52c2cb223f63;hb=cbd7463c986d54422de15cb3b56184de116ef7ba;hpb=877816b90b3c17582d32c7ed2ac56dd7042088e5 diff --git a/sync-all b/sync-all index 7ccc71d..8b41c97 100755 --- a/sync-all +++ b/sync-all @@ -310,20 +310,14 @@ sub scmall { 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 @@ -372,6 +366,9 @@ sub scmall { 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') { @@ -383,6 +380,12 @@ sub scmall { } 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; @@ -429,10 +432,12 @@ Supported commands: * remote add * remote rm * remote set-url [--push] + * checkout * grep * clean * reset * config + * log Available package-tags are: END