projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f5915d5
)
fix for remote repos without -r
author
Simon Marlow
<marlowsd@gmail.com>
Thu, 13 Jan 2011 13:11:47 +0000
(13:11 +0000)
committer
Simon Marlow
<marlowsd@gmail.com>
Thu, 13 Jan 2011 13:11:47 +0000
(13:11 +0000)
sync-all
patch
|
blob
|
history
diff --git
a/sync-all
b/sync-all
index
930cfd2
..
cfc44ea
100644
(file)
--- a/
sync-all
+++ b/
sync-all
@@
-3,22
+3,12
@@
use strict;
use Cwd;
use strict;
use Cwd;
-# Figure out where to get the other repositories from,
-# based on where this GHC repo came from.
-my $branch = `git branch | grep "\* " | sed "s/^\* //"`; chomp $branch;
-my $remote = `git config branch.$branch.remote`; chomp $remote;
-my $defaultrepo = `git config remote.$remote.url`; chomp $defaultrepo;
-
-my $defaultrepo_base;
-my $checked_out_tree;
-
+my $defaultrepo;
my @packages;
my @packages;
-
my $verbose = 2;
my $ignore_failure = 0;
my $want_remote_repo = 0;
my $checked_out_flag = 0;
my $verbose = 2;
my $ignore_failure = 0;
my $want_remote_repo = 0;
my $checked_out_flag = 0;
-
my $get_mode;
# Flags specific to a particular command
my $get_mode;
# Flags specific to a particular command
@@
-29,8
+19,18
@@
my %tags;
# Figure out where to get the other repositories from.
sub getrepo {
my $basedir = ".";
# Figure out where to get the other repositories from.
sub getrepo {
my $basedir = ".";
- my $repo = $defaultrepo || `cat $basedir/_darcs/prefs/defaultrepo`;
- chomp $repo;
+ my $repo;
+
+ if (defined($defaultrepo)) {
+ $repo = $defaultrepo;
+ chomp $repo;
+ } else {
+ # Figure out where to get the other repositories from,
+ # based on where this GHC repo came from.
+ my $branch = `git branch | grep "\* " | sed "s/^\* //"`; chomp $branch;
+ my $remote = `git config branch.$branch.remote`; chomp $remote;
+ $repo = `git config remote.$remote.url`; chomp $repo;
+ }
my $repo_base;
my $checked_out_tree;
my $repo_base;
my $checked_out_tree;