コード例 #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);
        }
コード例 #2
0
ファイル: IsCurrent.cs プロジェクト: BaseDorp/TankGame
        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);
        }
コード例 #3
0
 static void AddConflictResolution(
     MergeChangeInfo conflict,
     DirectoryConflictResolveActions resolveAction,
     string renameValue,
     List <DirectoryConflictResolutionData> conflictResolutions)
 {
     conflictResolutions.Add(new DirectoryConflictResolutionData(
                                 conflict.DirectoryConflict,
                                 conflict.Xlink,
                                 conflict.GetMount().Mount,
                                 resolveAction,
                                 renameValue));
 }
コード例 #4
0
        static bool IsFileConflictResolved(
            MergeChangeInfo changeInfo,
            MergeSolvedFileConflicts solvedFileConflicts)
        {
            if (solvedFileConflicts == null)
            {
                return(false);
            }

            return(solvedFileConflicts.IsResolved(
                       changeInfo.GetMount().Id,
                       changeInfo.GetRevision().ItemId));
        }
コード例 #5
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);
        }
コード例 #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);
        }
コード例 #7
0
        static void DoDirectoryConflictResolutionPanel(
            List <MergeChangeInfo> selectedChangeInfos,
            Action <MergeChangeInfo> resolveDirectoryConflictAction,
            Dictionary <DirectoryConflict, ConflictResolutionState> conflictResolutionStates)
        {
            MergeChangeInfo selectedDirectoryConflict = selectedChangeInfos[0];

            if (selectedDirectoryConflict.DirectoryConflict.IsResolved())
            {
                return;
            }

            DirectoryConflictUserInfo conflictUserInfo;

            DirectoryConflictAction[] conflictActions;

            DirectoryConflictResolutionInfo.FromDirectoryConflict(
                selectedDirectoryConflict.GetMount(),
                selectedDirectoryConflict.DirectoryConflict,
                out conflictUserInfo,
                out conflictActions);

            ConflictResolutionState conflictResolutionState = GetConflictResolutionState(
                selectedDirectoryConflict.DirectoryConflict,
                conflictActions,
                conflictResolutionStates);

            int pendingSelectedConflictsCount = GetPendingConflictsCount(
                selectedChangeInfos);

            DrawDirectoryResolutionPanel.ForConflict(
                selectedDirectoryConflict,
                (pendingSelectedConflictsCount <= 1) ? 0 : pendingSelectedConflictsCount - 1,
                conflictUserInfo,
                conflictActions,
                resolveDirectoryConflictAction,
                ref conflictResolutionState);
        }