@@ -10,7 +10,7 @@ import { LifecyclePhase } from 'vs/workbench/services/lifecycle/common/lifecycle
10
10
import { Action2 , MenuId , registerAction2 } from 'vs/platform/actions/common/actions' ;
11
11
import { ServicesAccessor } from 'vs/editor/browser/editorExtensions' ;
12
12
import { localize } from 'vs/nls' ;
13
- import { ISessionSyncWorkbenchService , Change , ChangeType , Folder , EditSession , FileType , EDIT_SESSION_SYNC_TITLE } from 'vs/workbench/services/sessionSync/common/sessionSync' ;
13
+ import { ISessionSyncWorkbenchService , Change , ChangeType , Folder , EditSession , FileType , EDIT_SESSION_SYNC_TITLE , EditSessionSchemaVersion } from 'vs/workbench/services/sessionSync/common/sessionSync' ;
14
14
import { ISCMRepository , ISCMService } from 'vs/workbench/contrib/scm/common/scm' ;
15
15
import { IFileService } from 'vs/platform/files/common/files' ;
16
16
import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace' ;
@@ -26,6 +26,7 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
26
26
import { INotificationService } from 'vs/platform/notification/common/notification' ;
27
27
import { IDialogService } from 'vs/platform/dialogs/common/dialogs' ;
28
28
import { ILogService } from 'vs/platform/log/common/log' ;
29
+ import { IProductService } from 'vs/platform/product/common/productService' ;
29
30
30
31
registerSingleton ( ISessionSyncWorkbenchService , SessionSyncWorkbenchService ) ;
31
32
@@ -51,6 +52,7 @@ export class SessionSyncContribution extends Disposable implements IWorkbenchCon
51
52
@INotificationService private readonly notificationService : INotificationService ,
52
53
@IDialogService private readonly dialogService : IDialogService ,
53
54
@ILogService private readonly logService : ILogService ,
55
+ @IProductService private readonly productService : IProductService ,
54
56
@IConfigurationService private configurationService : IConfigurationService ,
55
57
@IWorkspaceContextService private readonly contextService : IWorkspaceContextService ,
56
58
) {
@@ -126,6 +128,11 @@ export class SessionSyncContribution extends Disposable implements IWorkbenchCon
126
128
return ;
127
129
}
128
130
131
+ if ( editSession . version > EditSessionSchemaVersion ) {
132
+ this . notificationService . error ( localize ( 'client too old' , "Please upgrade to a newer version of {0} to apply this edit session." , this . productService . nameLong ) ) ;
133
+ return ;
134
+ }
135
+
129
136
try {
130
137
const changes : ( { uri : URI ; type : ChangeType ; contents : string | undefined } ) [ ] = [ ] ;
131
138
let hasLocalUncommittedChanges = false ;
0 commit comments