86
}
87
}
89
>
// First time syncing to remote
90
>
else if (fileContent) {
91
this.logService.trace(`${this.syncResourceLogLabel}: Remote ${this.syncResource.syncResource} does not exist. Synchronizing ${this.syncResource.syncResource} for the first time.`);
92
content = fileContent.value.toString();
93
hasRemoteChanged = true;
94
}
96
>
const previewResult: IMergeResult = {
97
>
content: hasConflicts ? lastSyncContent : content,
98
>
localChange: hasLocalChanged ? fileContent ? Change.Modified : Change.Added : Change.None,
99
>
remoteChange: hasRemoteChanged ? Change.Modified : Change.None,
100
>
hasConflicts
101
>
};
102
>
103
>
const localContent = fileContent ? fileContent.value.toString() : null;
104
>
return [{
105
>
fileContent,
106
>
107
>
baseResource: this.baseResource,
108
>
baseContent: lastSyncContent,
109
>
110
>
localResource: this.localResource,
111
>
localContent,
112
>
localChange: previewResult.localChange,
113
>
114
>
remoteResource: this.remoteResource,
115
>
remoteContent,
116
>
remoteChange: previewResult.remoteChange,
117
>
118
>
previewResource: this.previewResource,
119
>
previewResult,
120
>
acceptedResource: this.acceptedResource,
121
>
}];
122
>
}
123
124
protected async hasRemoteChanged(lastSyncUserData: IRemoteUserData): Promise<boolean> {