[commit: ghc] master: Add support for external repositories to sync-all (2e41f2f)

git at git.haskell.org git at git.haskell.org
Sun Aug 18 18:43:22 CEST 2013


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/2e41f2fa91c833a4420ac273254e49468044bc4b/ghc

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

commit 2e41f2fa91c833a4420ac273254e49468044bc4b
Author: Austin Seipp <aseipp at pobox.com>
Date:   Sun Aug 18 11:33:57 2013 -0500

    Add support for external repositories to sync-all
    
    Signed-off-by: Austin Seipp <aseipp at pobox.com>


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

2e41f2fa91c833a4420ac273254e49468044bc4b
 sync-all |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/sync-all b/sync-all
index 535e2ea..d53185e 100755
--- a/sync-all
+++ b/sync-all
@@ -316,6 +316,10 @@ sub gitall {
             }
         }
 
+        # Some extra packages like 'async' may be external URLs,
+        # e.g. git://... or http://...
+        my $is_external_url = $remotepath =~ m/^(git:\/\/|https:\/\/|http:\/\/)/;
+
         open RESUME, "> resume.tmp";
         print RESUME "$localpath\n";
         print RESUME "$doing\n";
@@ -324,12 +328,12 @@ sub gitall {
 
         # We can't create directories on GitHub, so we translate
         # "packages/foo" into "package-foo".
-        if ($is_github_repo) {
+        if ($is_github_repo && !defined($is_external_url)) {
             $remotepath =~ s/\//-/;
         }
 
         # Construct the path for this package in the repo we pulled from
-        $path = "$repo_base/$remotepath";
+        $path = $is_external_url ? $remotepath : "$repo_base/$remotepath";
 
         if ($command eq "get") {
             next if $remotepath eq "-"; # "git submodule init/update" will get this later





More information about the ghc-commits mailing list