X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=sync-all;h=6ff06cce8d91e83f18d76ab957ac45fc30f13322;hp=b202fe7aa097714a7bfec7a7a3d7f9ee2a02cb0f;hb=f298598973ca51134074c8801f062382a86328ed;hpb=e893450fbc9d8a1fdb5f697403feb6f23a5590b1 diff --git a/sync-all b/sync-all index b202fe7..6ff06cc 100755 --- a/sync-all +++ b/sync-all @@ -262,7 +262,6 @@ sub scmall { } push(@args, @_); - print "args: @args\n"; for $line (@packages) { @@ -290,25 +289,31 @@ sub scmall { } # Work out the arguments we should give to the SCM - if ($command =~ /^(?:w|wh|wha|what|whats|whatsn|whatsne|whatsnew)$/) { + if ($command =~ /^(?:w|wh|wha|what|whats|whatsn|whatsne|whatsnew|status)$/) { @scm_args = (($scm eq "darcs" and "whatsnew") or ($scm eq "git" and "status")); # Hack around 'darcs whatsnew' failing if there are no changes $ignore_failure = 1; } + elsif ($command =~ /^commit$/) { + @scm_args = ("commit"); + # git fails if there is nothing to commit, so ignore failures + $ignore_failure = 1; + } elsif ($command =~ /^(?:pus|push)$/) { @scm_args = "push"; - $want_remote_repo = 1; } elsif ($command =~ /^(?:pul|pull)$/) { @scm_args = "pull"; - $want_remote_repo = 1; # Q: should we append the -a argument for darcs repos? } elsif ($command =~ /^(?:g|ge|get)$/) { # Skip any repositories we have not included the tag for if (not defined($tags{$tag})) { + $tags{$tag} = 0; + } + if ($tags{$tag} == 0) { next; } @@ -354,6 +359,17 @@ sub scmall { @scm_args = ("remote", "set-url", $branch_name, $path); } } + elsif ($command =~ /^grep$/) { + @scm_args = ("grep"); + # Hack around 'git grep' failing if there are no matches + $ignore_failure = 1; + } + elsif ($command =~ /^reset$/) { + @scm_args = "reset"; + } + elsif ($command =~ /^config$/) { + @scm_args = "config"; + } else { die "Unknown command: $command"; } @@ -395,6 +411,7 @@ What do you want to do? Supported commands: * whatsnew + * commit * push * pull * get, with options: @@ -407,6 +424,9 @@ Supported commands: * remote add * remote rm * remote set-url [--push] + * grep + * reset + * config Available package-tags are: END @@ -467,9 +487,11 @@ sub main { } # -- says we grab the libs tagged 'tag' with # 'get'. It has no effect on the other commands. - elsif ($arg =~ m/^--/) { - $arg =~ s/^--//; - $tags{$arg} = 1; + elsif ($arg =~ m/^--no-(.*)$/) { + $tags{$1} = 0; + } + elsif ($arg =~ m/^--(.*)$/) { + $tags{$1} = 1; } else { unshift @_, $arg;