No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ConfigurePartialWorkspace.cs 1.2KB

12345678910111213141516171819202122232425262728293031323334
  1. using System.Collections.Generic;
  2. using System.IO;
  3. using Codice.Client.Commands.WkTree;
  4. using Codice.Client.Common;
  5. using Codice.Client.Common.GameUI;
  6. using Codice.CM.Common;
  7. using Codice.CM.Common.Mount;
  8. using Codice.CM.Common.Partial;
  9. using Codice.CM.WorkspaceServer.DataStore.Configuration;
  10. namespace Unity.PlasticSCM.Editor.Configuration
  11. {
  12. internal static class ConfigurePartialWorkspace
  13. {
  14. internal static void AsFullyChecked(WorkspaceInfo wkInfo)
  15. {
  16. string rootPath = WorkspacePath.GetWorkspacePathFromCmPath(
  17. wkInfo.ClientPath, "/", Path.DirectorySeparatorChar);
  18. WorkspaceTreeNode rootWkNode = CmConnection.Get().GetWorkspaceTreeHandler().
  19. WkGetWorkspaceTreeNode(rootPath);
  20. FullyCheckedDirectory rootDirectory = new FullyCheckedDirectory();
  21. rootDirectory.MountId = MountPointId.WORKSPACE_ROOT;
  22. rootDirectory.ItemId = rootWkNode.RevInfo.ItemId;
  23. List<FullyCheckedDirectory> directoryList = new List<FullyCheckedDirectory>();
  24. directoryList.Add(rootDirectory);
  25. FullyCheckedDirectoriesStorage.Save(wkInfo, directoryList);
  26. }
  27. }
  28. }