-my @top_dirs = ("nofib", "testsuite");
-
-# Figure out where to get the other repositories from,
-# based on where this GHC repo came from.
-my $defaultrepo = `cat _darcs/prefs/defaultrepo`;
-chomp $defaultrepo;
-my $defaultrepo_base;
-my $defaultrepo_lib;
-
-if ($defaultrepo =~ /:/) {
- # HTTP or SSH
- $defaultrepo_base = $defaultrepo;
- $defaultrepo_base =~ s#/ghc$##;
- $defaultrepo_lib = "$defaultrepo_base/packages";
-}
-elsif ($defaultrepo =~ /^\//) {
- # Local filesystem (assumes a checked-out tree):
- $defaultrepo_base = $defaultrepo;
- $defaultrepo_lib = "$defaultrepo/libraries";
-}
-else {
- die "Couldn't work out defaultrepo";
-}
+# Usage:
+#
+# ./darcs-all [-q] [-s] [-i] [-r repo]
+# [--nofib] [--testsuite] [--checked-out] cmd [darcs flags]
+#
+# Applies the darcs command "cmd" to each repository in the tree.
+#
+# e.g.
+# ./darcs-all -r http://darcs.haskell.org/ghc get
+# To get any repos which do not exist in the local tree
+#
+# ./darcs-all -r ~/ghc-validate push
+# To push all your repos to the ~/ghc-validate tree
+#
+# ./darcs-all pull -a
+# To pull everything from the default repos
+#
+# ./darc-all push --dry-run
+# To see what local patches you have relative to the main repos
+#
+# -q says to be quite, and -s to be silent.
+#
+# -i says to ignore darcs errors and move on to the next repository
+#
+# -r repo says to use repo as the location of package repositories
+#
+# --checked-out says that the remote repo is in checked-out layout, as
+# opposed to the layout used for the main repo. By default a repo on
+# the local filesystem is assumed to be checked-out, and repos accessed
+# via HTTP or SSH are assumed to be in the main repo layout; use
+# --checked-out to override the latter.
+#
+# --nofib, --testsuite also get the nofib and testsuite repos respectively
+#
+# The darcs get flag you are most likely to want is --complete. By
+# default we pass darcs the --partial flag.
+#
+
+$| = 1; # autoflush stdout after each print, to avoid output after die