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", @_);
43 open IN, "< packages" or die "Can't open packages file";
46 if (/^([^# ]+) +(?:([^ ]+) +)?([^ ]+) +([^ ]+)$/) {
48 $tag = defined($2) ? $2 : "";
52 $path = "$reporoot/$localpath";
55 $path = "$reporoot/$remotepath";
58 if (-d "$localpath/_darcs") {
59 darcs_push ($path, @_, "--repodir", $localpath);
62 message "== Required repo $localpath is missing! Skipping";
65 message "== $localpath repo not present; skipping";
68 elsif (! /^(#.*)?$/) {
76 if (! -d "_darcs" || ! -d "compiler") {
77 die "error: darcs-all must be run from the top level of the ghc tree."
83 # We handle -q here as well as lower down as we need to skip
84 # over it if it comes before the darcs command
88 elsif ($arg eq "--ignore-failure") {
91 elsif ($arg eq "--checked-out") {
94 elsif ($arg eq "--push") {
95 $push_pull_send = "push";
97 elsif ($arg eq "--pull") {
98 $push_pull_send = "pull";
100 elsif ($arg eq "--send") {
101 $push_pull_send = "send";
105 if (grep /^-q$/, @_) {
113 die "Where do you want to push to?";