@@ -114,6 +114,22 @@ export class ExtensionsSynchroniser extends AbstractSynchroniser implements IUse
114114 } ;
115115 }
116116
117+ protected async generateReplacePreview ( syncData : ISyncData , remoteUserData : IRemoteUserData , lastSyncUserData : ILastSyncUserData | null ) : Promise < IExtensionsSyncPreview > {
118+ const installedExtensions = await this . extensionManagementService . getInstalled ( ) ;
119+ const localExtensions = this . getLocalExtensions ( installedExtensions ) ;
120+ const syncExtensions = await this . parseAndMigrateExtensions ( syncData ) ;
121+ const ignoredExtensions = getIgnoredExtensions ( installedExtensions , this . configurationService ) ;
122+ const { added, updated, removed } = merge ( localExtensions , syncExtensions , localExtensions , [ ] , ignoredExtensions ) ;
123+
124+ return {
125+ added, removed, updated, remote : syncExtensions , remoteUserData, localExtensions, skippedExtensions : [ ] , lastSyncUserData,
126+ hasLocalChanged : added . length > 0 || removed . length > 0 || updated . length > 0 ,
127+ hasRemoteChanged : true ,
128+ isLastSyncFromCurrentMachine : false ,
129+ hasConflicts : false ,
130+ } ;
131+ }
132+
117133 protected async generatePreview ( remoteUserData : IRemoteUserData , lastSyncUserData : ILastSyncUserData | null ) : Promise < IExtensionsSyncPreview > {
118134 const remoteExtensions : ISyncExtension [ ] | null = remoteUserData . syncData ? await this . parseAndMigrateExtensions ( remoteUserData . syncData ) : null ;
119135 const skippedExtensions : ISyncExtension [ ] = lastSyncUserData ? lastSyncUserData . skippedExtensions || [ ] : [ ] ;
@@ -159,22 +175,6 @@ export class ExtensionsSynchroniser extends AbstractSynchroniser implements IUse
159175 throw new Error ( `${ this . syncResourceLogLabel } : Conflicts should not occur` ) ;
160176 }
161177
162- protected async performReplace ( syncData : ISyncData , remoteUserData : IRemoteUserData , lastSyncUserData : ILastSyncUserData | null ) : Promise < void > {
163- const installedExtensions = await this . extensionManagementService . getInstalled ( ) ;
164- const localExtensions = this . getLocalExtensions ( installedExtensions ) ;
165- const syncExtensions = await this . parseAndMigrateExtensions ( syncData ) ;
166- const ignoredExtensions = getIgnoredExtensions ( installedExtensions , this . configurationService ) ;
167- const { added, updated, removed } = merge ( localExtensions , syncExtensions , localExtensions , [ ] , ignoredExtensions ) ;
168-
169- await this . applyPreview ( {
170- added, removed, updated, remote : syncExtensions , remoteUserData, localExtensions, skippedExtensions : [ ] , lastSyncUserData,
171- hasLocalChanged : added . length > 0 || removed . length > 0 || updated . length > 0 ,
172- hasRemoteChanged : true ,
173- isLastSyncFromCurrentMachine : false ,
174- hasConflicts : false ,
175- } , false ) ;
176- }
177-
178178 protected async applyPreview ( { added, removed, updated, remote, remoteUserData, skippedExtensions, lastSyncUserData, localExtensions, hasLocalChanged, hasRemoteChanged } : IExtensionsSyncPreview , forcePush : boolean ) : Promise < void > {
179179
180180 if ( ! hasLocalChanged && ! hasRemoteChanged ) {
0 commit comments