Add a test in darcs-all for old bytestring repositories
[ghc-hetmet.git] / darcs-all
index 56290ab..cdef628 100644 (file)
--- a/darcs-all
+++ b/darcs-all
@@ -279,5 +279,23 @@ sub main {
     }
 }
 
+END {
+    message "== Checking for old bytestring repo";
+    if (-d "libraries/bytestring/_darcs") {
+        if ((system "darcs annotate --repodir libraries/bytestring --match 'hash 20080118173113-3fd76-d5b74c04372a297b585ebea4e16d524551ce5035' > /dev/null 2> /dev/null") == 0) {
+            print <<EOF;
+============================
+ATTENTION!
+
+You have an old bytestring repository in your GHC tree!
+
+Please remove it (e.g. "rm -r libraries/bytestring"), and the new
+version of bytestring will be used from a tarball instead.
+============================
+EOF
+        }
+    }
+}
+
 main(@ARGV);