Merge branch 'stable-2.15' into stable-2.16

* stable-2.15:
  Elasticsearch: Exclude types from V7 which deprecates them
  Send an email notification when the HTTP password is deleted or changed
  Send email notification when SSH key or GPG key is removed
  Show progress on number of users migrated during schema migration 146

Additional changes done in this merge to adjust to stable-2.16:

- Replace slf4j with Flogger.
- Edit newly added soy templates to remove 'autoescape' and 'kind' parameters
  which are no longer needed and cause parsing errors.
- Move newly added email sender classes to correct package.

Change-Id: I01a804f10c7247d18a0958eb7e0f03cbcf7453c7
This commit is contained in:
David Pursehouse
2019-05-21 09:10:42 +09:00
20 changed files with 665 additions and 44 deletions

View File

@@ -80,6 +80,7 @@ public class Schema_146 extends SchemaVersion {
ObjectInserter oi = repo.newObjectInserter()) {
ObjectId emptyTree = emptyTree(oi);
int i = 0;
for (Map.Entry<Account.Id, Timestamp> e : scanAccounts(db).entrySet()) {
String refName = RefNames.refsUsers(e.getKey());
Ref ref = repo.exactRef(refName);
@@ -88,7 +89,12 @@ public class Schema_146 extends SchemaVersion {
} else {
createUserBranch(repo, oi, emptyTree, e.getKey(), e.getValue());
}
i++;
if (i % 100 == 0) {
ui.message(String.format("... migrated %d users", i));
}
}
ui.message(String.format("Migrated all %d users to schema 146", i));
} catch (IOException e) {
throw new OrmException("Failed to rewrite user branches.", e);
}