public void AddQuoteWithValueAdds()
 {
     var args = new PrivateArguments();
     args.AddQuote("testValue");
     Assert.AreEqual(1, args.Count);
     Assert.AreEqual("\"testValue\"", args.ToString());
 }
예제 #2
0
        //    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("-version:D{0}~D{1}", FormatCommandDate(from.StartTime), FormatCommandDate(to.StartTime)));
            buffer.Add("-recursive");
            buffer.Add("-format:detailed");

            if (!string.IsNullOrEmpty(Username) && !string.IsNullOrEmpty(Password.PrivateValue))
            {
                if (!string.IsNullOrEmpty(Domain))
                {
                    Username = Domain + @"\" + Username;
                }

                buffer.Add("-login:" + this.Username, this.Password);
            }

            return NewProcessInfo(buffer, to);
        }
예제 #3
0
 //    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.Add(result.Label);
     buffer.AddQuote(WorkingDirectory);
     buffer.Add("/recursive");
     return NewProcessInfo(buffer, result);
 }
예제 #4
0
 // tf get itemspec [/version:versionspec] [/all] [/overwrite] [/force]
 // [/preview] [/recursive] [/noprompt]
 private ProcessInfo GetWorkSpaceProcessInfo(IIntegrationResult result)
 {
     var buffer = new PrivateArguments(
         "get",
         "/force",
         "/recursive",
         "/noprompt");
     buffer.AddQuote(WorkingDirectory);
     return NewProcessInfo(buffer, result);
 }
예제 #5
0
 // 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:", Workspace);
     return NewProcessInfo(buffer, result);
 }
예제 #6
0
 // 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);
     return NewProcessInfo(buffer, result);
 }
예제 #7
0
 // tf workspaces /delete [/owner:ownername] [/computer:computername]
 // [/server:servername] workspacename
 private ProcessInfo DeleteWorkSpaceProcessInfo(IIntegrationResult result)
 {
     var buffer = new PrivateArguments(
         "workspace",
         "/delete");
     // buffer.Add("/computer:", Environment.MachineName);
     buffer.Add("-server:", Server);
     buffer.AddQuote(Workspace);
     return NewProcessInfo(buffer, result);
 }
예제 #8
0
        // 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);

            return NewProcessInfo(buffer, result);
        }
예제 #9
0
 // 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);
     return NewProcessInfo(buffer, result);
 }
예제 #10
0
        //	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);
        }
예제 #11
0
        //	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);
        }
예제 #12
0
        // 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);
        }
예제 #13
0
        // tf get itemspec [/version:versionspec] [/all] [/overwrite] [/force] 
        // [/preview] [/recursive] [/noprompt]
        private ProcessInfo GetWorkSpaceProcessInfo(IIntegrationResult result)
        {
            var buffer = new PrivateArguments(
                "get",
                "/recursive",
                "/noprompt");

            if (Force)
            {
                buffer.Add("/force");
            }

            buffer.AddQuote(WorkingDirectory);

            AppendSourceControlAuthentication(buffer);

            return NewProcessInfo(buffer, result);
        }
예제 #14
0
        // 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);
        }