fix: suppress bulk conflict resolution notice spam

Bulk newest-revision conflict resolution created one notice per resolved file
and updated progress for nine out of every ten files.

Keep per-file bulk resolution success messages in the log without displaying
notices, update notice-level progress once every ten files, and cover both
behaviours with unit tests.
This commit is contained in:
Ouyang Xingyuan
2026-07-14 17:25:26 +08:00
committed by vorotamoroz
parent 943b2a3bd4
commit 3103dc4f52
2 changed files with 69 additions and 2 deletions
@@ -58,7 +58,7 @@ export class ModuleConflictResolver extends AbstractModule {
this._log(`Could not write the resolved content to the storage: ${path}`, LOG_LEVEL_NOTICE);
return MISSING_OR_ERROR;
}
const level = subTitle.indexOf("same") !== -1 ? LOG_LEVEL_INFO : LOG_LEVEL_NOTICE;
const level = subTitle.indexOf("same") !== -1 || subTitle === "NEWEST" ? LOG_LEVEL_INFO : LOG_LEVEL_NOTICE;
this._log(`${path} has been merged automatically`, level);
return AUTO_MERGED;
}
@@ -214,7 +214,8 @@ export class ModuleConflictResolver extends AbstractModule {
let i = 0;
for (const file of files) {
if (i++ % 10)
i++;
if (i % 10 === 0)
this._log(
`Check and Processing ${i} / ${files.length}`,
LOG_LEVEL_NOTICE,