X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=sync-all;h=5dc6a40953d7b78a7323d34635ffbcf3d53f6ea1;hp=a7b579ed99254a65479509db0d8d38a63d109a76;hb=4ac2bb39dffb4b825ece73b349ff0d56d79092d7;hpb=272466d88e4311a1afe066755b88fd5cf782b255 diff --git a/sync-all b/sync-all index a7b579e..5dc6a40 100755 --- a/sync-all +++ b/sync-all @@ -283,6 +283,9 @@ sub scmall { if (-d $localpath) { warning("$localpath already present; omitting") if $localpath ne "."; + if ($scm eq "git") { + scm ($localpath, $scm, "config", "core.ignorecase", "true"); + } next; } @@ -307,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 @@ -380,12 +377,22 @@ 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; 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"; @@ -422,7 +429,9 @@ Supported commands: * remote add * remote rm * remote set-url [--push] + * checkout * grep + * clean * reset * config