Beispiel #1
0
        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);
        }
Beispiel #2
0
        static bool IsSameConflict(
            MergeSolvedFileConflicts.CurrentConflict currentConflict,
            MergeChangeInfo changeInfo)
        {
            if (changeInfo == null)
            {
                return(false);
            }

            return(currentConflict.MountId.Equals(changeInfo.GetMount().Id) &&
                   currentConflict.ItemId == changeInfo.GetRevision().ItemId);
        }
Beispiel #3
0
        static bool IsFileConflictResolved(
            MergeChangeInfo changeInfo,
            MergeSolvedFileConflicts solvedFileConflicts)
        {
            if (solvedFileConflicts == null)
            {
                return(false);
            }

            return(solvedFileConflicts.IsResolved(
                       changeInfo.GetMount().Id,
                       changeInfo.GetRevision().ItemId));
        }
Beispiel #4
0
        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));
        }
Beispiel #6
0
        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);
        }