Remove trailing whitespace from HaddockUtils
[ghc-hetmet.git] / push-all
index d4491cf..ef4dbc8 100644 (file)
--- a/push-all
+++ b/push-all
@@ -39,13 +39,15 @@ sub pushall {
     my $remotepath;
     my $path;
     my $tag;
-    my $ghcrepo = $checked_out ? $reporoot : "$reporoot/ghc";
-    darcs_push ($ghcrepo, @_);
-
+    my @repos;
+    
     open IN, "< packages" or die "Can't open packages file";
-    while (<IN>) {
+    @repos = <IN>;
+    close IN;
+
+    REPO: foreach (@repos) {
         chomp;
-        if (/^([^ ]+) +(?:([^ ]+) +)?([^ ]+)/) {
+        if (/^([^# ]+) +(?:([^ ]+) +)?([^ ]+) +([^ ]+)$/) {
             $localpath = $1;
             $tag = defined($2) ? $2 : "";
             $remotepath = $3;
@@ -54,7 +56,13 @@ sub pushall {
                 $path = "$reporoot/$localpath";
             }
             else {
-                $path = "$reporoot/$remotepath";
+                if ($remotepath =~ /^http:/) {
+                    message "Ignoring $localpath; remote is http URL";
+                    next REPO;
+                }
+                else {
+                    $path = "$reporoot/$remotepath";
+                }
             }
 
             if (-d "$localpath/_darcs") {
@@ -67,8 +75,10 @@ sub pushall {
                 message "== $localpath repo not present; skipping";
             }
         }
+        elsif (! /^(#.*)?$/) {
+            die "Bad line: $_";
+        }
     }
-    close IN;
 }
 
 sub main {