예제 #1
0
        static void DoDirectoryConflictsHeader(MergeTreeResult conflicts)
        {
            int directoryConflictsCount =
                MergeTreeResultParser.GetDirectoryConflictsCount(conflicts);
            int pendingDirectoryConflictsCount =
                MergeTreeResultParser.GetUnsolvedDirectoryConflictsCount(
                    conflicts);

            if (directoryConflictsCount == 0)
            {
                return;
            }

            GUIStyle pendingDirectoryConflictsOfTotalStyle =
                pendingDirectoryConflictsCount > 0 ?
                UnityStyles.IncomingChangesTab.RedPendingConflictsOfTotalLabel :
                UnityStyles.IncomingChangesTab.GreenPendingConflictsOfTotalLabel;

            GUILayout.Label(
                string.Format("{0}/{1}", pendingDirectoryConflictsCount, directoryConflictsCount),
                pendingDirectoryConflictsOfTotalStyle);

            GUILayout.Label(
                MergeViewTexts.GetDirectoryConflictsUnsolvedCaption(directoryConflictsCount),
                UnityStyles.IncomingChangesTab.PendingConflictsLabel);
        }
예제 #2
0
        static void DoFileConflictsHeader(
            MergeTreeResult conflicts,
            MergeSolvedFileConflicts solvedFileConflicts,
            MountPointWithPath mount)
        {
            int fileConflictsCount        = MergeTreeResultParser.GetFileConflictsCount(conflicts);
            int pendingFileConflictsCount = MergeTreeResultParser.GetUnsolvedFileConflictsCount(
                conflicts, mount.Id, solvedFileConflicts);

            GUIStyle pendingFileConflictsOfTotalStyle =
                pendingFileConflictsCount > 0 ?
                UnityStyles.IncomingChangesTab.RedPendingConflictsOfTotalLabel :
                UnityStyles.IncomingChangesTab.GreenPendingConflictsOfTotalLabel;

            GUILayout.Label(
                string.Format("{0}/{1}", pendingFileConflictsCount, fileConflictsCount),
                pendingFileConflictsOfTotalStyle);

            GUILayout.Label(
                MergeViewTexts.GetFileConflictsCaption(fileConflictsCount, true),
                UnityStyles.IncomingChangesTab.PendingConflictsLabel);

            GUILayout.Space(5);

            GUILayout.Label(
                MergeViewTexts.GetChangesToApplyCaption(
                    MergeTreeResultParser.GetChangesToApplySummary(conflicts)),
                UnityStyles.IncomingChangesTab.ChangesToApplySummaryLabel);
        }
예제 #3
0
        void MergeViewLogic.IMergeView.UpdateData(
            MergeTreeResult resultConflicts,
            ExplainMergeData explainMergeData,
            MergeSolvedFileConflicts solvedFileConflicts,
            MountPointWithPath rootMountPoint,
            bool isIncomingMerge,
            bool isMergeTo,
            bool isUpdateMerge,
            bool mergeHasFinished)
        {
            HideMessage();

            ShowProcessMergesButton(MergeViewTexts.GetProcessMergeButtonText(
                                        MergeTreeResultParser.GetFileConflictsCount(resultConflicts) > 0,
                                        true));

            mResultConflicts     = resultConflicts;
            mSolvedFileConflicts = solvedFileConflicts;
            mRootMountPoint      = rootMountPoint;
            mConflictResolutionStates.Clear();

            UpdateFileConflictsTree(
                IncomingChangesTree.BuildIncomingChangeCategories(
                    mResultConflicts,
                    this,
                    mRootMountPoint),
                mIncomingChangesTreeView);
        }