Пример #1
0
 public SynchronizerTest()
 {
     m_Instance = new Synchronizer(EqualityComparer<IFileReference>.Default, new ChangeFilterFactory());
     var gitGroup = CreateGroup();
     m_Group = gitGroup;
     m_MultiFileSystemHistory = new GitBasedMultiFileSystemHistoryService(gitGroup, gitGroup.GetHistoryService());
 }
Пример #2
0
        bool TryResolveConflict(ChangeGraphBuilder changeGraphBuilder, IMultiFileSystemHistoryService historyService, ConflictInfo conflict, out IFileReference resolved)
        {
            var graph = changeGraphBuilder.GetChangeGraphs(GetDiff(historyService, conflict)).Single();

            var sinks = graph.GetSinks().ToArray();

            return TryResolveConflict(sinks, out resolved);
        }
Пример #3
0
 IMultiFileSystemDiff GetDiff(IMultiFileSystemHistoryService historyService, ConflictInfo conflict)
 {
     return historyService.GetChanges(conflict.SnapshotId, historyService.LatestSnapshot.Id, new[] {conflict.FilePath});         
 }
Пример #4
0
        IMultiFileSystemDiff GetDiff(IMultiFileSystemHistoryService historyService, ISyncPoint syncPoint, IMultiFileSystemChangeFilter filter)
        {
            var fromSnapshotId = syncPoint?.MultiFileSystemSnapshotId;
            var toSnapshotId = historyService.LatestSnapshot.Id;

            var diff = fromSnapshotId == null 
                ? historyService.GetChanges(toSnapshotId) 
                : historyService.GetChanges(fromSnapshotId, toSnapshotId);
    

            return new FilteredMultiFileSystemDiff(diff, filter);
        }