Merge branch 'stable-2.15' into stable-2.16
* stable-2.15: Set version to 2.15.8 Upgrade JGit to 4.9.8.201812241815-r Set version to 2.14.18 Revert "Fix the missing DB entry in Gerrit DB" Upgrade JGit to 4.7.7.201812240805-r maven_jar: Add repo.eclipse.org to supported repositories Upgrade JGit to 4.5.5.201812240535-r Change-Id: I012c25d49b9c03e91404c3166f30fdb7f32810f5
This commit is contained in:
commit
a32ed26e9a
@ -136,21 +136,7 @@ public class AccountManager {
|
||||
try {
|
||||
Optional<ExternalId> optionalExtId = externalIds.get(who.getExternalIdKey());
|
||||
if (!optionalExtId.isPresent()) {
|
||||
if (who.getUserName().isPresent()) {
|
||||
ExternalId.Key key = ExternalId.Key.create(SCHEME_USERNAME, who.getUserName().get());
|
||||
Optional<ExternalId> existingId = externalIds.get(key);
|
||||
if (existingId.isPresent()) {
|
||||
// An inconsistency is detected in the database, having a record for scheme "username:"
|
||||
// but no record for scheme "gerrit:". Try to recover by linking
|
||||
// "gerrit:" identity to the existing account.
|
||||
logger.atWarning().log(
|
||||
"User %s already has an account; link new identity to the existing account.",
|
||||
who.getUserName());
|
||||
return link(existingId.get().accountId(), who);
|
||||
}
|
||||
}
|
||||
// New account, automatically create and return.
|
||||
logger.atFine().log("External ID not found. Attempting to create new account.");
|
||||
return create(who);
|
||||
}
|
||||
|
||||
@ -416,7 +402,6 @@ public class AccountManager {
|
||||
public AuthResult link(Account.Id to, AuthRequest who)
|
||||
throws AccountException, OrmException, IOException, ConfigInvalidException {
|
||||
Optional<ExternalId> optionalExtId = externalIds.get(who.getExternalIdKey());
|
||||
logger.atFine().log("Link another authentication identity to an existing account");
|
||||
if (optionalExtId.isPresent()) {
|
||||
ExternalId extId = optionalExtId.get();
|
||||
if (!extId.accountId().equals(to)) {
|
||||
@ -425,7 +410,6 @@ public class AccountManager {
|
||||
}
|
||||
update(who, extId);
|
||||
} else {
|
||||
logger.atFine().log("Linking new external ID to the existing account");
|
||||
ExternalId newExtId =
|
||||
ExternalId.createWithEmail(who.getExternalIdKey(), to, who.getEmailAddress());
|
||||
checkEmailNotUsed(newExtId);
|
||||
|
@ -6,6 +6,8 @@ MAVEN_CENTRAL = "MAVEN_CENTRAL:"
|
||||
|
||||
MAVEN_LOCAL = "MAVEN_LOCAL:"
|
||||
|
||||
ECLIPSE = "ECLIPSE:"
|
||||
|
||||
def _maven_release(ctx, parts):
|
||||
"""induce jar and url name from maven coordinates."""
|
||||
if len(parts) not in [3, 4]:
|
||||
|
@ -15,13 +15,12 @@
|
||||
from os import path
|
||||
|
||||
REPO_ROOTS = {
|
||||
'GERRIT': 'http://gerrit-maven.storage.googleapis.com',
|
||||
'GERRIT_API':
|
||||
'https://gerrit-api.commondatastorage.googleapis.com/release',
|
||||
'MAVEN_CENTRAL': 'http://repo1.maven.org/maven2',
|
||||
'MAVEN_LOCAL': 'file://' + path.expanduser('~/.m2/repository'),
|
||||
'MAVEN_SNAPSHOT':
|
||||
'https://oss.sonatype.org/content/repositories/snapshots',
|
||||
'ECLIPSE': 'https://repo.eclipse.org/content/groups/releases',
|
||||
'GERRIT': 'http://gerrit-maven.storage.googleapis.com',
|
||||
'GERRIT_API': 'https://gerrit-api.commondatastorage.googleapis.com/release',
|
||||
'MAVEN_CENTRAL': 'http://repo1.maven.org/maven2',
|
||||
'MAVEN_LOCAL': 'file://' + path.expanduser('~/.m2/repository'),
|
||||
'MAVEN_SNAPSHOT': 'https://oss.sonatype.org/content/repositories/snapshots',
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user