@@ -9,7 +9,7 @@ import { Event } from 'vs/base/common/event';
9
9
import { FormattingOptions } from 'vs/base/common/jsonFormatter' ;
10
10
import { IJSONSchema } from 'vs/base/common/jsonSchema' ;
11
11
import { IDisposable } from 'vs/base/common/lifecycle' ;
12
- import { IExtUri , isEqualOrParent , joinPath } from 'vs/base/common/resources' ;
12
+ import { IExtUri } from 'vs/base/common/resources' ;
13
13
import { isObject , isString } from 'vs/base/common/types' ;
14
14
import { URI } from 'vs/base/common/uri' ;
15
15
import { IHeaders } from 'vs/base/parts/request/common/request' ;
@@ -21,7 +21,7 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation'
21
21
import { Extensions as JSONExtensions , IJSONContributionRegistry } from 'vs/platform/jsonschemas/common/jsonContributionRegistry' ;
22
22
import { ILogService } from 'vs/platform/log/common/log' ;
23
23
import { Registry } from 'vs/platform/registry/common/platform' ;
24
- import { IUserDataProfile , IUserDataProfilesService } from 'vs/platform/userDataProfile/common/userDataProfile' ;
24
+ import { IUserDataProfile } from 'vs/platform/userDataProfile/common/userDataProfile' ;
25
25
26
26
export const CONFIGURATION_SYNC_STORE_KEY = 'configurationSync.store' ;
27
27
@@ -479,17 +479,8 @@ export interface IUserDataSyncTask {
479
479
480
480
export interface IUserDataManualSyncTask extends IDisposable {
481
481
readonly id : string ;
482
- readonly status : SyncStatus ;
483
- readonly manifest : IUserDataResourceManifest | null ;
484
- readonly onSynchronizeResources : Event < [ SyncResource , URI [ ] ] [ ] > ;
485
- preview ( ) : Promise < IUserDataSyncResourcePreview [ ] > ;
486
- accept ( resource : URI , content ?: string | null ) : Promise < IUserDataSyncResourcePreview [ ] > ;
487
- merge ( resource ?: URI ) : Promise < IUserDataSyncResourcePreview [ ] > ;
488
- discard ( resource : URI ) : Promise < IUserDataSyncResourcePreview [ ] > ;
489
- discardConflicts ( ) : Promise < IUserDataSyncResourcePreview [ ] > ;
490
- apply ( ) : Promise < IUserDataSyncResourcePreview [ ] > ;
491
- pull ( ) : Promise < void > ;
492
- push ( ) : Promise < void > ;
482
+ merge ( ) : Promise < void > ;
483
+ apply ( ) : Promise < void > ;
493
484
stop ( ) : Promise < void > ;
494
485
}
495
486
@@ -514,7 +505,7 @@ export interface IUserDataSyncService {
514
505
515
506
createSyncTask ( manifest : IUserDataManifest | null , disableCache ?: boolean ) : Promise < IUserDataSyncTask > ;
516
507
createManualSyncTask ( ) : Promise < IUserDataManualSyncTask > ;
517
- accept ( resource : IUserDataSyncResource , conflictResource : URI , content : string | null | undefined , apply : boolean ) : Promise < void > ;
508
+ accept ( syncResource : IUserDataSyncResource , resource : URI , content : string | null | undefined , apply : boolean | { force : boolean } ) : Promise < void > ;
518
509
519
510
reset ( ) : Promise < void > ;
520
511
resetRemote ( ) : Promise < void > ;
@@ -560,20 +551,3 @@ export interface IConflictSetting {
560
551
561
552
export const USER_DATA_SYNC_SCHEME = 'vscode-userdata-sync' ;
562
553
export const PREVIEW_DIR_NAME = 'preview' ;
563
- export function getSyncResourceFromLocalPreview ( localPreview : URI , userDataProfilesService : IUserDataProfilesService , environmentService : IEnvironmentService ) : IUserDataSyncResource | undefined {
564
- if ( localPreview . scheme === USER_DATA_SYNC_SCHEME ) {
565
- return undefined ;
566
- }
567
- localPreview = localPreview . with ( { scheme : environmentService . userDataSyncHome . scheme } ) ;
568
- const syncResource = ALL_SYNC_RESOURCES . find ( syncResource => isEqualOrParent ( localPreview , joinPath ( environmentService . userDataSyncHome , syncResource , PREVIEW_DIR_NAME ) ) ) ;
569
- if ( syncResource ) {
570
- return { syncResource : syncResource , profile : userDataProfilesService . defaultProfile } ;
571
- }
572
- for ( const profile of userDataProfilesService . profiles . slice ( 1 ) ) {
573
- const syncResource = ALL_SYNC_RESOURCES . find ( syncResource => isEqualOrParent ( localPreview , joinPath ( environmentService . userDataSyncHome , profile . id , syncResource , PREVIEW_DIR_NAME ) ) ) ;
574
- if ( syncResource ) {
575
- return { syncResource : syncResource , profile } ;
576
- }
577
- }
578
- return undefined ;
579
- }
0 commit comments