5 my @top_dirs = ("nofib", "testsuite");
10 my $ignore_failure = 0;
12 # --checked-out says we are pushing to a checked out tree
14 # --core-only says we only want to push corelibs, not extralibs
24 print "warning: @_\n";
28 message "== running darcs @_";
29 system ("darcs", @_) == 0
31 or die "darcs failed: $?";
35 darcs ("push", "--no-set-default", @_);
40 my $ghcrepo = $checked_out ? $reporoot : "$reporoot/ghc";
41 darcs_push ($ghcrepo, @_);
42 for $dir (@top_dirs) {
43 if (-d $dir && -d "$dir/_darcs") {
44 darcs_push ("$reporoot/$dir", @_, "--repodir", $dir);
47 message "== $dir not present or not a repository; skipping";
50 my $library_lists = $core_only
51 ? "libraries/core-packages"
52 : "libraries/core-packages libraries/extra-packages";
53 for my $pkg (`cat $library_lists`) {
55 $dir = "libraries/$pkg";
57 darcs_push ("$reporoot/$dir", @_, "--repodir", "$dir");
60 warning("$pkg doesn't exist, use 'darcs-all get' to get it");
66 if (! -d "_darcs" || ! -d "compiler") {
67 die "error: darcs-all must be run from the top level of the ghc tree."
73 # We handle -q here as well as lower down as we need to skip
74 # over it if it comes before the darcs command
78 elsif ($arg eq "--ignore-failure") {
81 elsif ($arg eq "--checked-out") {
84 elsif ($arg eq "--core-only") {
89 if (grep /^-q$/, @_) {
97 die "Where do you want to push to?";