// tf workspace /new [/noprompt] [/template:workspacename[;workspaceowner]] // [/computer:computername] [/comment:("comment"|@comment file)] // [/s:servername] [workspacename[;workspaceowner]] private ProcessInfo CreateWorkSpaceProcessInfo(IIntegrationResult result) { var buffer = new PrivateArguments("workspace", "/new"); buffer.Add("/computer:", Environment.MachineName); buffer.AddQuote("/comment:", DEFAULT_WORKSPACE_COMMENT); buffer.Add("/server:", Server); buffer.AddQuote(Workspace); AppendSourceControlAuthentication(buffer); return(NewProcessInfo(buffer, result)); }
// tf workfold [/map] [/s:servername] [/workspace: workspacename] // repositoryfolder|localfolder private ProcessInfo MapWorkSpaceProcessInfo(IIntegrationResult result) { var buffer = new PrivateArguments("workfold", "/map"); buffer.AddQuote(ProjectPath); buffer.AddQuote(WorkingDirectory); buffer.Add("/server:", Server); buffer.Add("/workspace:", this.Workspace, true); AppendSourceControlAuthentication(buffer); return(NewProcessInfo(buffer, result)); }
// LABEL_COMMAND_FORMAT = "label [/server:servername] labelname[@scope] [/owner:ownername] // itemspec [/version:versionspec] [/comment:("comment"|@commentfile)] // [/child:(replace|merge)] [/recursive]" private ProcessInfo NewLabelProcessInfo(IIntegrationResult result) { var buffer = new PrivateArguments("label"); buffer.Add("/server:", Server); buffer.AddQuote(result.Label, string.Format(System.Globalization.CultureInfo.CurrentCulture, "@{0}", ProjectPath)); buffer.AddQuote(WorkingDirectory); buffer.Add("/recursive"); buffer.Add("/comment:", "CCNet Build Label", true); AppendSourceControlAuthentication(buffer); return(NewProcessInfo(buffer, result)); }
// tf get itemspec [/version:versionspec] [/all] [/overwrite] [/force] // [/preview] [/recursive] [/noprompt] private ProcessInfo GetWorkSpaceProcessInfo(IIntegrationResult result) { var buffer = new PrivateArguments( "get", "/recursive", "/noprompt"); if (All) { buffer.Add("/all"); } if (Overwrite) { buffer.Add("/overwrite"); } if (Force) { buffer.Add("/force"); } buffer.AddQuote(WorkingDirectory); AppendSourceControlAuthentication(buffer); return(NewProcessInfo(buffer, result)); }
public void AddQuoteWithPrefixedValueAdds() { var args = new PrivateArguments(); args.AddQuote("pre=", "test Value"); Assert.AreEqual(1, args.Count); Assert.AreEqual("pre=\"test Value\"", args.ToString()); }
// tf workspaces /delete [/owner:ownername] [/computer:computername] // [/server:servername] workspacename private ProcessInfo DeleteWorkSpaceProcessInfo(IIntegrationResult result) { var buffer = new PrivateArguments("workspace", "/delete"); buffer.Add("-server:", Server); buffer.AddQuote(Workspace); AppendSourceControlAuthentication(buffer); return(NewProcessInfo(buffer, result)); }
// tf dir [/server:servername] itemspec [/version:versionspec] // [/recursive] [/folders] [/deleted] private ProcessInfo CheckProjectProcessInfo(IIntegrationResult result) { var buffer = new PrivateArguments("dir", "/folders"); buffer.Add("/server:", Server); buffer.AddQuote(ProjectPath); AppendSourceControlAuthentication(buffer); return(NewProcessInfo(buffer, result)); }
// tf workspaces [/computer:computername][/server:servername] workspacename private ProcessInfo CheckWorkSpaceProcessInfo(IIntegrationResult result) { var buffer = new PrivateArguments("workspaces"); buffer.Add("/computer:", Environment.MachineName); buffer.Add("-server:", Server); buffer.Add("/format:detailed"); buffer.AddQuote(Workspace); AppendSourceControlAuthentication(buffer); return(NewProcessInfo(buffer, result)); }
// HISTORY_COMMAND_FORMAT = "tf history -noprompt -server:http://tfsserver:8080 $/TeamProjectName/path // -version:D2006-12-01T01:01:01Z~D2006-12-13T20:00:00Z -recursive // -format:detailed /login:DOMAIN\name,password" private ProcessInfo NewHistoryProcessInfo(IIntegrationResult from, IIntegrationResult to) { var buffer = new PrivateArguments("history", "-noprompt"); buffer.Add("-server:", Server); buffer.AddQuote(ProjectPath); buffer.Add(string.Format(System.Globalization.CultureInfo.CurrentCulture, "-version:D{0}~D{1}", FormatCommandDate(from.StartTime), FormatCommandDate(to.StartTime))); buffer.Add("-recursive"); buffer.Add("-format:detailed"); AppendSourceControlAuthentication(buffer); return(NewProcessInfo(buffer, to)); }