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";
48 REPO: foreach (@repos) {
50 if (/^([^# ]+) +(?:([^ ]+) +)?([^ ]+) +([^ ]+)$/) {
52 $tag = defined($2) ? $2 : "";
56 $path = "$reporoot/$localpath";
59 if ($remotepath =~ /^http:/) {
60 message "Ignoring $localpath; remote is http URL";
64 $path = "$reporoot/$remotepath";
68 if (-d "$localpath/_darcs") {
69 darcs_push ($path, @_, "--repodir", $localpath);
72 message "== Required repo $localpath is missing! Skipping";
75 message "== $localpath repo not present; skipping";
78 elsif (! /^(#.*)?$/) {
85 if (! -d "_darcs" || ! -d "compiler") {
86 die "error: darcs-all must be run from the top level of the ghc tree."
92 # We handle -q here as well as lower down as we need to skip
93 # over it if it comes before the darcs command
97 elsif ($arg eq "--ignore-failure") {
100 elsif ($arg eq "--checked-out") {
103 elsif ($arg eq "--push") {
104 $push_pull_send = "push";
106 elsif ($arg eq "--pull") {
107 $push_pull_send = "pull";
109 elsif ($arg eq "--send") {
110 $push_pull_send = "send";
114 if (grep /^-q$/, @_) {
122 die "Where do you want to push to?";