static void DiffIncomingChanges( MergeChangeInfo incomingChange, WorkspaceInfo wkInfo) { if (LaunchTool.ShowDownloadPlasticExeWindow( wkInfo, false, TrackFeatureUseEvent.Features.InstallPlasticCloudFromDiffIncomingChanges, TrackFeatureUseEvent.Features.InstallPlasticEnterpriseFromDiffIncomingChanges, TrackFeatureUseEvent.Features.CancelPlasticInstallationFromDiffIncomingChanges)) { return; } DiffOperation.DiffRevisions( wkInfo, incomingChange.GetMount().RepSpec, incomingChange.GetBaseRevision(), incomingChange.GetRevision(), incomingChange.GetPath(), incomingChange.GetPath(), true, xDiffLauncher: null, imageDiffLauncher: null); }
internal static string ForMetaChange( MergeChangeInfo change) { return(BuildCacheKey( change.CategoryType, MetaPath.GetMetaPath(change.GetPath()))); }
static void ExtractMetaToCache( MergeChangesCategory category, Dictionary <string, MergeChangeInfo> cache) { List <MergeChangeInfo> changes = category.GetChanges(); HashSet <string> indexedKeys = BuildIndexedKeys( changes); for (int i = changes.Count - 1; i >= 0; i--) { MergeChangeInfo currentChange = changes[i]; string path = currentChange.GetPath(); if (!MetaPath.IsMetaPath(path)) { continue; } string realPath = MetaPath.GetPathFromMetaPath(path); if (!indexedKeys.Contains(BuildKey.BuildCacheKey( currentChange.CategoryType, realPath))) { continue; } // found foo.c and foo.c.meta - move .meta to cache cache.Add(BuildKey.ForChange(currentChange), currentChange); changes.RemoveAt(i); } }
static void DiffIncomingChanges( MergeChangeInfo incomingChange, WorkspaceInfo wkInfo) { if (LaunchTool.ShowDownloadPlasticExeWindow(false)) { return; } DiffOperation.DiffRevisions( wkInfo, incomingChange.GetMount().RepSpec, incomingChange.GetBaseRevision(), incomingChange.GetRevision(), incomingChange.GetPath(), incomingChange.GetPath(), true, xDiffLauncher: null, imageDiffLauncher: null); }
static void DiffYoursWithIncoming( MergeChangeInfo incomingChange, WorkspaceInfo wkInfo) { if (LaunchTool.ShowDownloadPlasticExeWindow(false)) { return; } DiffOperation.DiffYoursWithIncoming( wkInfo, incomingChange.GetMount(), incomingChange.GetRevision(), incomingChange.GetPath(), xDiffLauncher: null, imageDiffLauncher: null); }
static Texture GetIcon( string wkPath, MergeChangeInfo incomingChange) { RevisionInfo revInfo = incomingChange.GetRevision(); bool isDirectory = revInfo. Type == EnumRevisionType.enDirectory; if (isDirectory || incomingChange.IsXLink()) { return(Images.GetDirectoryIcon()); } string fullPath = WorkspacePath.GetWorkspacePathFromCmPath( wkPath, incomingChange.GetPath(), Path.DirectorySeparatorChar); return(Images.GetFileIcon(fullPath)); }