Ejemplo n.º 1
0
        internal static Data ForPlasticIncomingChange(
            MergeChangeInfo incomingChange,
            bool isSolvedConflict)
        {
            if (incomingChange.CategoryType == MergeChangesCategory.Type.FileConflicts ||
                incomingChange.CategoryType == MergeChangesCategory.Type.DirectoryConflicts)
            {
                return(ForConflict(isSolvedConflict));
            }

            if (incomingChange.IsXLink())
            {
                return(BuildData.ForXLink());
            }

            if (incomingChange.CategoryType == MergeChangesCategory.Type.Deleted)
            {
                return(BuildData.ForDeletedOnServer());
            }

            if (incomingChange.CategoryType == MergeChangesCategory.Type.Changed)
            {
                return(BuildData.ForOutOfDate());
            }

            return(null);
        }
Ejemplo n.º 2
0
        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));
        }