From: <sk...@us...> - 2003-10-31 23:11:47
|
Update of /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Console/SharpCvsLib/Console/Parser In directory sc8-pr-cvs1:/tmp/cvs-serv23195/src/ICSharpCode.Console/SharpCvsLib/Console/Parser Modified Files: CommandLineParser.cs Log Message: Added Checkout command to test. Index: CommandLineParser.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Console/SharpCvsLib/Console/Parser/CommandLineParser.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CommandLineParser.cs 17 Oct 2003 02:04:28 -0000 1.2 --- CommandLineParser.cs 31 Oct 2003 23:11:43 -0000 1.3 *************** *** 38,41 **** --- 38,43 ---- using System; + using ICSharpCode.SharpCvsLib.Commands; + using ICSharpCode.SharpCvsLib.Console.Commands; namespace ICSharpCode.SharpCvsLib.Console.Parser { *************** *** 89,93 **** this.options = String.Empty; } ! /// <summary>Parse the command line options.</summary> public void Execute () { --- 91,107 ---- this.options = String.Empty; } ! ! /// <summary>Create a new instance of the command line parser and ! /// initialize the arguments object.</summary> ! /// <param name="args">A collection of strings that represent the command ! /// line arguments sent into the program.</param> ! public CommandLineParser () ! { ! //this.arguments = args; ! ! // TODO: Remove this hack when add method to set options. ! //this.options = String.Empty; ! } ! /// <summary>Parse the command line options.</summary> public void Execute () { *************** *** 100,107 **** case "checkout": case "co": ! this.command = arguments[i]; break; case "update": ! this.command = arguments[i]; break; case "--help": --- 114,136 ---- case "checkout": case "co": ! this.command = arguments[i++]; ! // if cvsroot is not set abort checkout ! // get rest of arguments which is options on the checkout command. ! // pass argument coOptions an array of strings. ! string repositoryname = arguments[i]; ! CheckoutCommand coCommand = ! new CheckoutCommand(cvsroot, repositoryname); ! break; ! case "login": ! // login to server ! break; ! case "passwd": ! // add to .cvspass file ! // scramble password ! // write to file ! this.command = arguments[++i]; break; case "update": ! this.command = arguments[++i]; break; case "--help": *************** *** 118,122 **** break; case "-d": ! cvsroot = arguments[i]; break; default: --- 147,151 ---- break; case "-d": ! cvsroot = arguments[++i]; break; default: |