static string GetPathForConflict( string wkPath, string cmPath) { return(WorkspacePath.GetWorkspacePathFromCmPath( wkPath, cmPath, PathHelper.GetDirectorySeparatorChar(wkPath))); }
static string GetFullPath(string wkPath, string path) { if (PathHelper.IsContainedOn(path, wkPath)) { return(path); } return(WorkspacePath.GetWorkspacePathFromCmPath( wkPath, path, Path.DirectorySeparatorChar)); }
static string GetPathForDiff( string wkPath, MountPointWithPath mountPoint, string cmSubPath) { return(WorkspacePath.GetWorkspacePathFromCmPath( wkPath, WorkspacePath.ComposeMountPath(mountPoint.MountPath, cmSubPath), PathHelper.GetDirectorySeparatorChar(wkPath))); }
static string GetDirectoryForSaveAs(string wkPath, string path) { if (PathHelper.IsContainedOn(path, wkPath)) { return(Path.GetDirectoryName(path)); } return(WorkspacePath.GetWorkspacePathFromCmPath( wkPath, Path.GetDirectoryName(path), Path.DirectorySeparatorChar)); }
static Texture GetIcon( string wkPath, IncomingChangeInfo incomingChange) { bool isDirectory = incomingChange.GetRevision(). Type == EnumRevisionType.enDirectory; if (isDirectory || incomingChange.IsXLink()) { return(Images.GetDirectoryIcon()); } string fullPath = WorkspacePath.GetWorkspacePathFromCmPath( wkPath, incomingChange.GetPath(), Path.DirectorySeparatorChar); return(Images.GetFileIcon(fullPath)); }
internal static void AsFullyChecked(WorkspaceInfo wkInfo) { string rootPath = WorkspacePath.GetWorkspacePathFromCmPath( wkInfo.ClientPath, "/", Path.DirectorySeparatorChar); WorkspaceTreeNode rootWkNode = CmConnection.Get().GetWorkspaceTreeHandler(). WkGetWorkspaceTreeNode(rootPath); FullyCheckedDirectory rootDirectory = new FullyCheckedDirectory(); rootDirectory.MountId = MountPointId.WORKSPACE_ROOT; rootDirectory.ItemId = rootWkNode.RevInfo.ItemId; List <FullyCheckedDirectory> directoryList = new List <FullyCheckedDirectory>(); directoryList.Add(rootDirectory); FullyCheckedDirectoriesStorage.Save(wkInfo, directoryList); }
internal static Dictionary <string, LockStatusData> ForLocks( string wkPath, Dictionary <WorkspaceTreeNode, LockInfo> lockInfoByNode) { Dictionary <string, LockStatusData> result = BuildPathDictionary.ForPlatform <LockStatusData>(); LockOwnerNameResolver nameResolver = new LockOwnerNameResolver(); foreach (WorkspaceTreeNode node in lockInfoByNode.Keys) { LockStatusData lockStatusData = BuildLockStatusData( node, lockInfoByNode[node], nameResolver); string nodeWkPath = WorkspacePath.GetWorkspacePathFromCmPath( wkPath, WorkspaceNodeOperations.GetCmPath(node), PathHelper.GetDirectorySeparatorChar(wkPath)); result.Add(nodeWkPath, lockStatusData); } return(result); }