mirror of https://github.com/qt/qt5.git
always make ssh-based gerrit remotes
there is no point in making read-only gerrit remotes. use gitorious for that. instead, create remotes which rely on proper ssh configuration if --codereview-username is not passed. Change-Id: I08812fd26f1de6df22cd952211f620f36f069e51 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This commit is contained in:
parent
eba69e730f
commit
4cbe91304a
|
@ -150,14 +150,11 @@ The `--http' option does not affect the gerrit remotes.
|
||||||
|
|
||||||
=item --codereview-username <Gerrit/JIRA username>
|
=item --codereview-username <Gerrit/JIRA username>
|
||||||
|
|
||||||
Adds a (potentially) writable remote named `gerrit' for each module,
|
Specify the user name for the (potentially) writable `gerrit' remote
|
||||||
for use with the Gerrit code review tool.
|
for each module, for use with the Gerrit code review tool.
|
||||||
This requires a username for SSH access to the codereview.qt-project.org
|
|
||||||
server, which will be the same username you have for the bugtracker at
|
|
||||||
bugreports.qt.nokia.com.
|
|
||||||
|
|
||||||
If this option is omitted, the gerrit remote is created with read-only
|
If this option is omitted, the gerrit remote is created without a username
|
||||||
access (using HTTP protocol).
|
and port number, and thus relies on a correct SSH configuration.
|
||||||
|
|
||||||
|
|
||||||
=item --alternates <path to other Qt5 repo>
|
=item --alternates <path to other Qt5 repo>
|
||||||
|
@ -257,10 +254,7 @@ my %PROTOCOL_REPOS = (
|
||||||
);
|
);
|
||||||
|
|
||||||
my $GERRIT_SSH_BASE
|
my $GERRIT_SSH_BASE
|
||||||
= 'ssh://codereview.qt-project.org:29418/';
|
= 'ssh://@USER@codereview.qt-project.org@PORT@/';
|
||||||
|
|
||||||
my $GERRIT_HTTP_BASE
|
|
||||||
= 'http://codereview.qt-project.org/p/';
|
|
||||||
|
|
||||||
my $BNE_MIRROR_URL_BASE
|
my $BNE_MIRROR_URL_BASE
|
||||||
= 'git://bq-git.apac.nokia.com/qtsoftware/';
|
= 'git://bq-git.apac.nokia.com/qtsoftware/';
|
||||||
|
@ -529,14 +523,16 @@ sub git_add_remotes
|
||||||
if ($gerrit_repo_basename && !$current_remotes{'gerrit'}) {
|
if ($gerrit_repo_basename && !$current_remotes{'gerrit'}) {
|
||||||
my $gerrit_repo_url;
|
my $gerrit_repo_url;
|
||||||
|
|
||||||
# If given a username, we use writable remote (ssh).
|
# If given a username, make a "verbose" remote.
|
||||||
# Otherwise, we use read-only (http).
|
# Otherwise, rely on proper SSH configuration.
|
||||||
if ($self->{'codereview-username'}) {
|
if ($self->{'codereview-username'}) {
|
||||||
$gerrit_repo_url = $GERRIT_SSH_BASE;
|
$gerrit_repo_url = $GERRIT_SSH_BASE;
|
||||||
$gerrit_repo_url =~ s[^ssh://][ssh://$self->{'codereview-username'}@];
|
$gerrit_repo_url =~ s,\@USER\@,$self->{'codereview-username'}\@,;
|
||||||
|
$gerrit_repo_url =~ s,\@PORT\@,:29418,;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$gerrit_repo_url = $GERRIT_HTTP_BASE;
|
$gerrit_repo_url = $GERRIT_SSH_BASE;
|
||||||
|
$gerrit_repo_url =~ s,\@[^\@]+\@,,g;
|
||||||
}
|
}
|
||||||
|
|
||||||
$gerrit_repo_url .= $gerrit_repo_basename;
|
$gerrit_repo_url .= $gerrit_repo_basename;
|
||||||
|
|
Loading…
Reference in New Issue