* @param startRevision inclusive * @param endRevision exclusive
(startRevision: number, endRevision: number)
| 289 | * @param endRevision exclusive |
| 290 | */ |
| 291 | private async fetchMissVersion(startRevision: number, endRevision: number): Promise<IRemoteChangeset[]> { |
| 292 | console.log('fetchingMissVersion', this.resourceId, startRevision, endRevision); |
| 293 | const result = await DatasheetApi.fetchChangesets<IChangesetPack>(this.resourceId, this.resourceType, |
| 294 | startRevision, endRevision, this.getState().pageParams.nodeId, this.getState().pageParams.shareId); |
| 295 | if (result.data.success) { |
| 296 | console.log('fetchMissVersion success: ', result.data.data); |
| 297 | |
| 298 | if (endRevision - startRevision !== result.data.data.length) { |
| 299 | throw new Error(t(Strings.error_the_length_of_changeset_is_inconsistent)); |
| 300 | } |
| 301 | return result.data.data; |
| 302 | } |
| 303 | |
| 304 | throw new Error(t(Strings.error_occurred_while_requesting_the_missing_version)); |
| 305 | } |
| 306 | |
| 307 | /** |
| 308 | * The backend actively pushes changesets submitted by others |
no test coverage detected