[commit: ghc] master: Make `sync-all remote set-url` use normalized `/packages/` urls (4f43572)
Herbert Valerio Riedel
hvr at ghc.haskell.org
Fri Aug 9 13:06:33 CEST 2013
Repository : http://darcs.haskell.org/ghc.git/
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/4f43572224b3c8723dc1bf0e886313b0e9c92049
>---------------------------------------------------------------
commit 4f43572224b3c8723dc1bf0e886313b0e9c92049
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date: Fri Aug 9 13:03:54 2013 +0200
Make `sync-all remote set-url` use normalized `/packages/` urls
A simple heuristic (i.e. replacing the `libraries/` suffix by
`packages/` in the inferred remotepath, if the remotepath in the
`packages` file is "-") used to infer the remotepath for Git
submodules. A proper solution would require to parse the `.gitmodules`
file to obtain the actual localpath<->remotepath mapping.
This addresses #8121 and is a follow-up to a22e908 which changed the
`.gitmodules` urls to use the `/packages/` folder instead of
`/libraries/`.
>---------------------------------------------------------------
sync-all | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/sync-all b/sync-all
index e3d6f35..293fbc7 100755
--- a/sync-all
+++ b/sync-all
@@ -455,7 +455,16 @@ sub gitall {
my $rpath;
$ignore_failure = 1;
if ($remotepath eq '-') {
- $rpath = "$repo_base/$localpath";
+ $rpath = "$localpath.git"; # N.B.: $localpath lacks the .git suffix
+ if ($localpath =~ /^libraries\//) {
+ # 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 = "$repo_base/$rpath";
} else {
$rpath = $path;
}
More information about the ghc-commits
mailing list