[commit: ghc] master: sync-all: Apply submodule url rewriting also to stuff in util/ (974a97e)

git at git.haskell.org git at git.haskell.org
Sat Apr 19 13:48:24 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/974a97e3e5f74177d9c09ceda060205959e2f15a/ghc

>---------------------------------------------------------------

commit 974a97e3e5f74177d9c09ceda060205959e2f15a
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Sat Apr 19 15:46:32 2014 +0200

    sync-all: Apply submodule url rewriting also to stuff in util/


>---------------------------------------------------------------

974a97e3e5f74177d9c09ceda060205959e2f15a
 sync-all |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sync-all b/sync-all
index 4c0e7c1..70c4254 100755
--- a/sync-all
+++ b/sync-all
@@ -476,13 +476,13 @@ sub gitall {
             $ignore_failure = 1;
             if ($remotepath eq '-') {
                 $rpath = "$localpath.git"; # N.B.: $localpath lacks the .git suffix
-                if ($localpath =~ /^libraries\//) {
+                if ($localpath =~ m!^(?:libraries|utils)/!) {
                     # FIXME: This is just a simple heuristic to
                     # infer the remotepath for Git submodules. A
                     # proper solution would require to parse the
                     # .gitmodules file to obtain the actual
                     # localpath<->remotepath mapping.
-                    $rpath =~ s/^libraries\//packages\//;
+                    $rpath =~ s!^(?:libraries|utils)/!packages/!;
                 }
                 $rpath = "$repo_base/$rpath";
             } else {
@@ -587,14 +587,14 @@ sub gitInitSubmodules {
 
     my $submodulespaths = &readgit(".", "config", "--get-regexp", "^submodule[.].*[.]url");
     # if we came from github, change the urls appropriately
-    while ($submodulespaths =~ m!^(submodule.libraries/[a-zA-Z0-9]+.url) ($GITHUB)/ghc/packages/([a-zA-Z0-9]+).git$!gm) {
+    while ($submodulespaths =~ m!^(submodule.(?:libraries|utils)/[a-zA-Z0-9]+.url) ($GITHUB)/ghc/packages/([a-zA-Z0-9]+).git$!gm) {
         &git(".", "config", $1, "$2/ghc/packages-$3");
     }
 
     # if we came from a local repository, grab our submodules from their
     # checkouts over there, if they exist.
     if ($repo_local) {
-        while ($submodulespaths =~ m!^(submodule.(libraries/[a-zA-Z0-9]+).url) .*$!gm) {
+        while ($submodulespaths =~ m!^(submodule.((?:libraries|utils)/[a-zA-Z0-9]+).url) .*$!gm) {
             if (-e "$repo_base/$2/.git") {
                 &git(".", "config", $1, "$repo_base/$2");
             }



More information about the ghc-commits mailing list