From 824cfe84a86995e356e949542b8189b3f67fd1c0 Mon Sep 17 00:00:00 2001 From: Alex Blasche Date: Wed, 14 Aug 2013 08:37:40 +0200 Subject: Cleanup of init-repository Removes old Nokia URLs and options associated with Nokia infrastructure Change-Id: Id5a28d7ed14fe069ceff6afbe372aa69dda80475 Reviewed-by: Sergio Ahumada Reviewed-by: Alex Blasche Reviewed-by: Joerg Bornemann Reviewed-by: Oswald Buddenhagen --- init-repository | 45 +++------------------------------------------ 1 file changed, 3 insertions(+), 42 deletions(-) (limited to 'init-repository') diff --git a/init-repository b/init-repository index b355ffa3..45de179a 100755 --- a/init-repository +++ b/init-repository @@ -104,8 +104,6 @@ Skip the `git submodule update' command. Set git config to ignore submodules by default when doing operations on the qt5 repo, such as `pull', `fetch', `diff' etc. -This option is default for --nokia-developer. - After using this option, pass `--ignore-submodules=none' to git to override it as needed. @@ -116,26 +114,12 @@ B =over -=item --nokia-developer - -Switch to internal Nokia URLs. - - =item --berlin -Switch to internal Nokia URLs and make use of the Berlin git mirrors. +Switch to internal URLs and make use of the Berlin git mirrors. (Implies `--mirror'). -=item --ssh - -Use the SSH protocol for git operations. This may be useful if the git -protocol is blocked by a firewall. Note that this requires a user account -with an uploaded SSH key on all servers used. (Implies `--nokia-developer'). - -The `--ssh' option does not affect the gerrit remotes. - - =item --http Use the HTTP protocol for git operations. This may be useful if the git @@ -205,8 +189,6 @@ use Pod::Usage qw( pod2usage ); use Cwd qw( getcwd ); my %PROTOCOLS = ( - 'internal' => 'git://scm.dev.nokia.troll.no/' , - 'ssh' => 'git@scm.dev.nokia.troll.no:' , 'http' => 'http://git.gitorious.org/' , ); @@ -317,7 +299,6 @@ sub parse_arguments 'force' => 0 , 'ignore-submodules' => 0 , 'mirror-url' => "", - 'nokia-developer' => 0 , 'protocol' => "", 'update' => 1 , 'webkit' => 1 , @@ -331,7 +312,6 @@ sub parse_arguments 'force' => \$self->{qw{ force }}, 'ignore-submodules' => \$self->{qw{ ignore-submodules }}, 'mirror=s' => \$self->{qw{ mirror-url }}, - 'nokia-developer' => \$self->{qw{ nokia-developer }}, 'quiet' => \$self->{qw{ quiet }}, 'update!' => \$self->{qw{ update }}, 'webkit!' => \$self->{qw{ webkit }}, @@ -339,26 +319,12 @@ sub parse_arguments 'help|?' => sub { pod2usage(1); }, 'http' => sub { $self->{protocol} = 'http'; }, - 'ssh|ssh-protocol' => sub { $self->{protocol} = 'ssh'; }, - 'berlin|berlin-nokia-developer' => sub { - $self->{'nokia-developer'} = 1; - $self->{'protocol'} = 'internal'; + 'berlin' => sub { $self->{'mirror-url'} = $BER_MIRROR_URL_BASE; }, - - 'nokia-developer' => sub { - $self->{'nokia-developer'} = 1; - $self->{'protocol'} = 'internal'; - $self->{'ignore-submodules'} = 1; - }, ) || pod2usage(2); - if ($self->{'nokia-developer'} && $self->{'protocol'} eq 'http') { - print "*** Ignoring use of HTTP protocol, as it's only usable with external server\n"; - $self->{'protocol'} = ''; - } - # Replace any double trailing slashes from end of mirror $self->{'mirror-url'} =~ s{//+$}{/}; @@ -457,12 +423,7 @@ sub git_set_submodule_config my $value = $2; if ($protocol) { - # qt-labs projects are still hosted under qt internally. - if ($protocol ne 'http') { - $value =~ s,^git://gitorious\.org/qt-labs/,${url_base_for_protocol}qt/,; - } - - # assume all other projects hosted under gitorious publicly. + # rewrite URL to chosen protocol $value =~ s,^git://gitorious\.org/,$url_base_for_protocol,; } -- cgit v1.2.3 From 941dd92e5b16140cc2e6f766130887ad80a160e4 Mon Sep 17 00:00:00 2001 From: Alex Blasche Date: Wed, 14 Aug 2013 08:41:58 +0200 Subject: Add --oslo option to init-repository Oslo devs can use a local git mirror. Change-Id: Id6f919ff65ddf0c0b5839316014f51d2293008fd Reviewed-by: Sergio Ahumada Reviewed-by: Alex Blasche Reviewed-by: Joerg Bornemann --- init-repository | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'init-repository') diff --git a/init-repository b/init-repository index 45de179a..9995d877 100755 --- a/init-repository +++ b/init-repository @@ -119,6 +119,11 @@ B Switch to internal URLs and make use of the Berlin git mirrors. (Implies `--mirror'). +=item --oslo + +Switch to internal URLs and make use of the Oslo git mirrors. +(Implies `--mirror'). + =item --http @@ -261,6 +266,9 @@ my $GERRIT_SSH_BASE my $BER_MIRROR_URL_BASE = 'git://hegel/'; +my $OSLO_MIRROR_URL_BASE + = 'git://qilin/'; + sub new { my ($class, @arguments) = @_; @@ -323,6 +331,9 @@ sub parse_arguments 'berlin' => sub { $self->{'mirror-url'} = $BER_MIRROR_URL_BASE; }, + 'oslo' => sub { + $self->{'mirror-url'} = $OSLO_MIRROR_URL_BASE; + }, ) || pod2usage(2); # Replace any double trailing slashes from end of mirror -- cgit v1.2.3