8 my $ignore_failure = 0;
10 # --checked-out says we are pushing to a checked out tree
12 # --push or --pull or --send?
13 my $push_pull_send = "push";
22 print "warning: @_\n";
26 message "== running darcs @_";
27 system ("darcs", @_) == 0
29 or die "darcs failed: $?";
33 darcs ($push_pull_send, "--no-set-default", @_);
42 my $ghcrepo = $checked_out ? $reporoot : "$reporoot/ghc";
43 darcs_push ($ghcrepo, @_);
45 open IN, "< packages" or die "Can't open packages file";
48 if (/^([^ ]+) +(?:([^ ]+) +)?([^ ]+)/) {
50 $tag = defined($2) ? $2 : "";
54 $path = "$reporoot/$localpath";
57 $path = "$reporoot/$remotepath";
60 if (-d "$localpath/_darcs") {
61 darcs_push ($path, @_, "--repodir", $localpath);
64 message "== Required repo $localpath is missing! Skipping";
67 message "== $localpath repo not present; skipping";
70 elsif (! /^(#.*)?$/) {
78 if (! -d "_darcs" || ! -d "compiler") {
79 die "error: darcs-all must be run from the top level of the ghc tree."
85 # We handle -q here as well as lower down as we need to skip
86 # over it if it comes before the darcs command
90 elsif ($arg eq "--ignore-failure") {
93 elsif ($arg eq "--checked-out") {
96 elsif ($arg eq "--push") {
97 $push_pull_send = "push";
99 elsif ($arg eq "--pull") {
100 $push_pull_send = "pull";
102 elsif ($arg eq "--send") {
103 $push_pull_send = "send";
107 if (grep /^-q$/, @_) {
115 die "Where do you want to push to?";