5 my @top_dirs = ("nofib", "testsuite");
10 my $ignore_failure = 0;
12 # --checked-out says we are pushing to a checked out tree
14 # --boot-only says we only want to push bootlibs, not extralibs
16 # --push or --pull or --send?
17 my $push_pull_send = "push";
26 print "warning: @_\n";
30 message "== running darcs @_";
31 system ("darcs", @_) == 0
33 or die "darcs failed: $?";
37 darcs ($push_pull_send, "--no-set-default", @_);
42 my $ghcrepo = $checked_out ? $reporoot : "$reporoot/ghc";
43 darcs_push ($ghcrepo, @_);
44 for $dir (@top_dirs) {
45 if (-d $dir && -d "$dir/_darcs") {
46 darcs_push ("$reporoot/$dir", @_, "--repodir", $dir);
49 message "== $dir not present or not a repository; skipping";
52 my $library_lists = $boot_only
53 ? "libraries/boot-packages"
54 : "libraries/boot-packages libraries/extra-packages";
55 for my $pkg (`cat $library_lists`) {
57 $dir = "libraries/$pkg";
59 darcs_push ("$reporoot/$dir", @_, "--repodir", "$dir");
62 warning("$pkg doesn't exist, use 'darcs-all get' to get it");
68 if (! -d "_darcs" || ! -d "compiler") {
69 die "error: darcs-all must be run from the top level of the ghc tree."
75 # We handle -q here as well as lower down as we need to skip
76 # over it if it comes before the darcs command
80 elsif ($arg eq "--ignore-failure") {
83 elsif ($arg eq "--checked-out") {
86 elsif ($arg eq "--boot-only") {
89 elsif ($arg eq "--push") {
90 $push_pull_send = "push";
92 elsif ($arg eq "--pull") {
93 $push_pull_send = "pull";
95 elsif ($arg eq "--send") {
96 $push_pull_send = "send";
100 if (grep /^-q$/, @_) {
108 die "Where do you want to push to?";