@@ -9,7 +9,7 @@ import { Event } from 'vs/base/common/event';
99import { FormattingOptions } from 'vs/base/common/jsonFormatter' ;
1010import { IJSONSchema } from 'vs/base/common/jsonSchema' ;
1111import { IDisposable } from 'vs/base/common/lifecycle' ;
12- import { IExtUri , isEqualOrParent , joinPath } from 'vs/base/common/resources' ;
12+ import { IExtUri } from 'vs/base/common/resources' ;
1313import { isObject , isString } from 'vs/base/common/types' ;
1414import { URI } from 'vs/base/common/uri' ;
1515import { IHeaders } from 'vs/base/parts/request/common/request' ;
@@ -21,7 +21,7 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation'
2121import { Extensions as JSONExtensions , IJSONContributionRegistry } from 'vs/platform/jsonschemas/common/jsonContributionRegistry' ;
2222import { ILogService } from 'vs/platform/log/common/log' ;
2323import { 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' ;
2525
2626export const CONFIGURATION_SYNC_STORE_KEY = 'configurationSync.store' ;
2727
@@ -479,17 +479,8 @@ export interface IUserDataSyncTask {
479479
480480export interface IUserDataManualSyncTask extends IDisposable {
481481 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 > ;
493484 stop ( ) : Promise < void > ;
494485}
495486
@@ -514,7 +505,7 @@ export interface IUserDataSyncService {
514505
515506 createSyncTask ( manifest : IUserDataManifest | null , disableCache ?: boolean ) : Promise < IUserDataSyncTask > ;
516507 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 > ;
518509
519510 reset ( ) : Promise < void > ;
520511 resetRemote ( ) : Promise < void > ;
@@ -560,20 +551,3 @@ export interface IConflictSetting {
560551
561552export const USER_DATA_SYNC_SCHEME = 'vscode-userdata-sync' ;
562553export 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