MCPcopy Create free account
hub / github.com/apitable/apitable / checkMissChanges

Method checkMissChanges

packages/core/src/engine/engine.ts:369–387  ·  view source on GitHub ↗
(revisionUpgradeTo: number)

Source from the content-addressed store, hash-verified

367
368 // Check the missing version of the remote changeset, and if there is one, directly fill in the missing changeset and apply it to the snapshot.
369 async checkMissChanges(revisionUpgradeTo: number) {
370 const revision = this.getRevision();
371
372 /**
373 * The remote newChange version needs to be exactly equal to the version + 1 to go through the normal process.
374 * If the version gap is greater than 1, you need to fill in the intermediate version
375 */
376 if (revisionUpgradeTo === revision + 1) {
377 return;
378 }
379 if (revisionUpgradeTo <= revision) {
380 return;
381 }
382
383 const changesetList = await this.fetchMissVersion(revision + 1, revisionUpgradeTo);
384 changesetList.forEach(cs => {
385 this.applyNewChanges(cs);
386 });
387 }
388
389 // Check the version gap between the local snapshot and the local changeset.
390 // If there is a gap, transform and rebase the localChangeset.

Callers 4

handleAcceptCommitMethod · 0.95
handleNewChangesMethod · 0.95
checkLocalDiffChangesMethod · 0.95
requestServerViewFunction · 0.80

Calls 4

fetchMissVersionMethod · 0.95
applyNewChangesMethod · 0.95
getRevisionMethod · 0.45
forEachMethod · 0.45

Tested by

no test coverage detected