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", @_);
44 open IN, "< packages" or die "Can't open packages file";
50 if (/^([^# ]+) +(?:([^ ]+) +)?([^ ]+) +([^ ]+)$/) {
52 $tag = defined($2) ? $2 : "";
56 $path = "$reporoot/$localpath";
59 $path = "$reporoot/$remotepath";
62 if (-d "$localpath/_darcs") {
63 darcs_push ($path, @_, "--repodir", $localpath);
66 message "== Required repo $localpath is missing! Skipping";
69 message "== $localpath repo not present; skipping";
72 elsif (! /^(#.*)?$/) {
79 if (! -d "_darcs" || ! -d "compiler") {
80 die "error: darcs-all must be run from the top level of the ghc tree."
86 # We handle -q here as well as lower down as we need to skip
87 # over it if it comes before the darcs command
91 elsif ($arg eq "--ignore-failure") {
94 elsif ($arg eq "--checked-out") {
97 elsif ($arg eq "--push") {
98 $push_pull_send = "push";
100 elsif ($arg eq "--pull") {
101 $push_pull_send = "pull";
103 elsif ($arg eq "--send") {
104 $push_pull_send = "send";
108 if (grep /^-q$/, @_) {
116 die "Where do you want to push to?";