public void UpdateBranch(BranchType Branch) { if (!_branchMap.ContainsKey(Branch)) { throw new MyTfsConnectionException("Invalid branch: " + Branch); } List <BranchType> branches = BranchToList(Branch); foreach (var branch in branches) { try { string localPath = _branchMap[branch].Local; var itemSpec = new ItemSpec(localPath, RecursionType.Full); var getRequest = new GetRequest(itemSpec, VersionSpec.Latest); Output.WriteLine("\nUpdating {0} branch...", branch.ToString()); //GetStatus getStatus = _workSpace.Get(getRequest, GetOptions.NoAutoResolve); GetStatus getStatus = WorkSpace.Get(getRequest, GetOptions.None); //Output.WriteLine(" {0} files ({1} bytes) downloaded", getStatus.NumFiles, getStatus.NumBytes); Output.WriteLine(); } catch (Exception ex) { throw new MyTfsConnectionException("Exception on Get():\n" + ex.ToString()); } } }
public void UpdateAndCreatedWorkspace( WorkSpace.WorkSpaceTypeEnum workspaceTypeEnum, String adminType) { //Update The Created Workspace Logger.LogMethodEntry("CreateWorkspace", "UpdateAndCreatedWorkspace", base.IsTakeScreenShotDuringEntryExit); //Fetch the workspace name WorkSpace worspaceName = WorkSpace.Get(workspaceTypeEnum); //Searched created workspace new AdminToolPage().SearchCreatedWorkspace( (AdminToolPage.AdminWorkspaceTypeEnum)Enum.Parse (typeof(AdminToolPage.AdminWorkspaceTypeEnum), adminType), worspaceName.Name); Logger.LogMethodExit("CreateWorkspace", "UpdateAndCreatedWorkspace", base.IsTakeScreenShotDuringEntryExit); }
public IList <Conflict> UpdateBranch(string localPath, GetOptions getOptions = GetOptions.None) { if (Directory.Exists(localPath) == false && File.Exists(localPath) == false) { throw new ArgumentException("Local path does not exist: " + localPath); } var itemSpec = new ItemSpec(localPath, RecursionType.Full); var getRequest = new GetRequest(itemSpec, VersionSpec.Latest); GetStatus getStatus = WorkSpace.Get(getRequest, getOptions); if (getStatus.NumFailures > 0) { throw new MyTfsConnectionException(getStatus.NumFailures + " failures when Getting " + localPath); } return(GetConflicts(localPath, getStatus)); }