You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(43) |
Oct
(128) |
Nov
(144) |
Dec
(160) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(85) |
Feb
(74) |
Mar
(30) |
Apr
(7) |
May
(5) |
Jun
(16) |
Jul
(38) |
Aug
(115) |
Sep
(35) |
Oct
(97) |
Nov
(73) |
Dec
(11) |
2005 |
Jan
(104) |
Feb
(167) |
Mar
(31) |
Apr
(13) |
May
|
Jun
(8) |
Jul
(1) |
Aug
|
Sep
(10) |
Oct
(3) |
Nov
(2) |
Dec
|
2006 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
From: Clayton H. <dr...@us...> - 2005-03-28 07:10:33
|
Update of /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Console/SharpCvsLib/Console/Parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24611/src/ICSharpCode.Console/SharpCvsLib/Console/Parser Modified Files: AddCommandParser.cs ICommandParser.cs ImportCommandParser.cs Log Message: Commit command has issue, if the message is specified using the -m command then the message is parsed by the file parser. I will add an issue for this, too late to tackle tonight. Index: AddCommandParser.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Console/SharpCvsLib/Console/Parser/AddCommandParser.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** AddCommandParser.cs 28 Mar 2005 04:24:10 -0000 1.10 --- AddCommandParser.cs 28 Mar 2005 07:10:20 -0000 1.11 *************** *** 154,192 **** } } - /// <summary> - /// Setup the list of files to be a folder object for the cvs - /// library to process. - /// </summary> - /// <param name="filesAdded">An array filenames that are to be added - /// to the cvs repository.</param> - private Folders GetFoldersToAdd (ICollection filesAdded) { - Folders folders = new Folders(); - Manager manager = new Manager(Environment.CurrentDirectory); - LOGGER.Debug("Number of files copied=[" + filesAdded.Count + "]"); - foreach (String file in filesAdded) { - Folder folder; - if (!folders.Contains(Path.GetDirectoryName(file))) { - folder = new Folder(); - LOGGER.Debug("file=[" + file + "]"); - LOGGER.Debug("file path=[" + Path.GetDirectoryName(file) + "]"); - folder.Repository = - manager.FetchRepository(Path.GetDirectoryName(file)); - folder.Root = - manager.FetchRoot(Path.GetDirectoryName(file)); - folder.Tag = - manager.FetchTag(Path.GetDirectoryName(file)); - folders.Add(Path.GetDirectoryName(file), folder); - } else { - folder = folders[Path.GetDirectoryName(file)]; - } - if (!folder.Entries.Contains(file)) { - Entry entry = Entry.CreateEntry(new FileInfo(file)); - folder.Entries.Add (file, entry); - } else { - folder.Entries[file] = Entry.CreateEntry(new FileInfo(file)); - } - } - return folders; - } /// <summary> --- 154,157 ---- Index: ICommandParser.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Console/SharpCvsLib/Console/Parser/ICommandParser.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ICommandParser.cs 4 Aug 2004 00:48:08 -0000 1.4 --- ICommandParser.cs 28 Mar 2005 07:10:24 -0000 1.5 *************** *** 77,88 **** /// <summary> - /// Indicates if the command is implemented currently in the command line client and/ or the - /// sharpcvs library. <code>true</code> if it is implemented, otherwise <code>false</code>. - /// - /// NOTE: This will eventually go away. - /// </summary> - bool Implemented {get;} - - /// <summary> /// Create the command object that will be used to act on the repository. /// </summary> --- 77,80 ---- Index: ImportCommandParser.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Console/SharpCvsLib/Console/Parser/ImportCommandParser.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ImportCommandParser.cs 28 Mar 2005 06:24:37 -0000 1.4 --- ImportCommandParser.cs 28 Mar 2005 07:10:24 -0000 1.5 *************** *** 183,187 **** case "-W": throw new NotImplementedException(string.Format("Argument not implemented {0}.", arg)); - break; } } else { --- 183,186 ---- |
From: Clayton H. <dr...@us...> - 2005-03-28 06:24:47
|
Update of /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Console/SharpCvsLib/Console/Parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv432/src/ICSharpCode.Console/SharpCvsLib/Console/Parser Modified Files: ImportCommandParser.cs Log Message: Changed the import console command to not import all files by default. Also fixed a bug in the parser routine. Index: ImportCommandParser.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Console/SharpCvsLib/Console/Parser/ImportCommandParser.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ImportCommandParser.cs 19 Jan 2005 08:02:39 -0000 1.3 --- ImportCommandParser.cs 28 Mar 2005 06:24:37 -0000 1.4 *************** *** 54,59 **** private string message; ! private string vendor; ! private string release; private string branch; --- 54,59 ---- private string message; ! private string vendor = "tcvs-vendor"; ! private string release = "tcvs-release"; private string branch; *************** *** 81,93 **** public ImportCommandParser(CvsRoot cvsroot, string[] args) { this.CvsRoot = cvsroot; ! this.unparsedOptions = args; } /// <summary> ! /// Create a new instance of the <see cref="CheckoutCommandParser"/>. /// </summary> /// <returns></returns> public static ICommandParser GetInstance() { ! return GetInstance(typeof(InitCommandParser)); } --- 81,93 ---- public ImportCommandParser(CvsRoot cvsroot, string[] args) { this.CvsRoot = cvsroot; ! this.Args = args; } /// <summary> ! /// Create a new instance of the <see cref="ImportCommandParser"/>. /// </summary> /// <returns></returns> public static ICommandParser GetInstance() { ! return GetInstance(typeof(ImportCommandParser)); } *************** *** 130,181 **** /// is not implemented currently. TODO: Implement the argument.</exception> public override ICommand CreateCommand () { ! ICSharpCode.SharpCvsLib.Commands.ImportModuleCommand importCommand; ! try { ! this.ParseOptions(this.unparsedOptions); ! Manager manager = new Manager(Environment.CurrentDirectory); ! DirectoryInfo importDir = new DirectoryInfo(Environment.CurrentDirectory); ! if (!importDir.Exists) { ! ConsoleMain.ExitProgram("Import directory does not exist."); ! } ! CurrentWorkingDirectory.Folders = ! manager.FetchFilesToAdd(importDir.FullName); ! importCommand = ! new ICSharpCode.SharpCvsLib.Commands.ImportModuleCommand( ! CurrentWorkingDirectory, this.message); ! importCommand.VendorString = this.vendor; ! importCommand.ReleaseString = this.release; ! importCommand.LogMessage = this.message; ! // importCommand.Repository = this.repository; ! } ! catch (Exception e) { ! LOGGER.Error (e); ! throw e; ! } return importCommand; } - public override void ParseOptions() { - this.ParseOptions(this.Args); - } - /// <summary> /// Parse the command line options/ arguments and populate the command /// object with the arguments. /// </summary> ! /// <param name="arguments">A string value that holds the command ! /// line options the user has selected.</param> ! private void ParseOptions (string[] arguments) { ! string singleOptions = "Cdfn"; ! string options = string.Empty; ! int i = 0; ! // get rest of arguments which is options on the checkout command. ! while (arguments.Length > i && arguments[i].Trim().IndexOf("-") == 0){ ! // Get options with second parameters? ! string arg = arguments[i].Trim(); ! if (arg.IndexOfAny( singleOptions.ToCharArray(), 1, 1) >= 0){ switch (arg) { case "-C": --- 130,165 ---- /// is not implemented currently. TODO: Implement the argument.</exception> public override ICommand CreateCommand () { ! ImportModuleCommand importCommand; ! this.ParseOptions(); ! Manager manager = new Manager(Environment.CurrentDirectory); ! this.CurrentWorkingDirectory = ! new WorkingDirectory(this.CvsRoot, ! this.CurrentDir.FullName, this.Module); ! DirectoryInfo importDir = ! new DirectoryInfo(Environment.CurrentDirectory); ! if (!importDir.Exists) { ! ConsoleMain.ExitProgram("Import directory does not exist."); ! } ! importCommand = ! new ImportModuleCommand(CurrentWorkingDirectory, this.message); ! importCommand.VendorString = this.vendor; ! importCommand.ReleaseString = this.release; ! importCommand.LogMessage = this.message; return importCommand; } /// <summary> /// Parse the command line options/ arguments and populate the command /// object with the arguments. /// </summary> ! public override void ParseOptions () { ! int noDashIndex = 0; ! for (int i = 0; i < this.Args.Length; i++) { ! string arg = Args[i]; ! if (arg.StartsWith("-")) { switch (arg) { case "-C": *************** *** 187,195 **** case "-n": throw new NotImplementedException(string.Format("Argument not implemented {0}.", arg)); - default: - break; - } - } else { - switch (arg) { case "-k": throw new NotImplementedException(string.Format("Argument not implemented {0}.", arg)); --- 171,174 ---- *************** *** 197,232 **** throw new NotImplementedException(string.Format("Argument not implemented {0}.", arg)); case "-b": ! this.branch = arguments[++i]; break; case "-m": ! this.message = arguments[++i]; break; case "-W": throw new NotImplementedException(string.Format("Argument not implemented {0}.", arg)); - default: break; } } - i++; - } - if (arguments.Length > i){ - // Safely grab the module, if not specified then - // pass null into the repository...the cvs command - // line for cvsnt/ cvs seems to bomb out when - // it sends to the server - this.Module = arguments[i++]; - } else { - this.Module = String.Empty; - } - - if (arguments.Length > i){ - this.vendor = arguments[i++]; - } else { - this.vendor = String.Empty; - } - if (arguments.Length > i){ - this.release = arguments[i++]; - } else { - this.release = String.Empty; } } --- 176,200 ---- throw new NotImplementedException(string.Format("Argument not implemented {0}.", arg)); case "-b": ! this.branch = this.Args[++i]; break; case "-m": ! this.message = this.Args[++i]; break; case "-W": throw new NotImplementedException(string.Format("Argument not implemented {0}.", arg)); break; } + } else { + if (0 == noDashIndex) { + this.Module = this.Args[i]; + noDashIndex++; + } else if (1 == noDashIndex) { + this.vendor = this.Args[i]; + noDashIndex++; + } else if (2 == noDashIndex) { + this.release = this.Args[i]; + noDashIndex++; + } } } } |
From: Clayton H. <dr...@us...> - 2005-03-28 06:24:47
|
Update of /cvsroot/sharpcvslib/sharpcvslib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv432 Modified Files: SharpCvsLib.sln Log Message: Changed the import console command to not import all files by default. Also fixed a bug in the parser routine. Index: SharpCvsLib.sln =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/SharpCvsLib.sln,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** SharpCvsLib.sln 26 Feb 2005 23:50:49 -0000 1.25 --- SharpCvsLib.sln 28 Mar 2005 06:24:36 -0000 1.26 *************** *** 31,34 **** --- 31,36 ---- ProjectSection(ProjectDependencies) = postProject EndProjectSection + ProjectSection(ProjectDependencies) = postProject + EndProjectSection EndProject Global *************** *** 44,50 **** --- 46,54 ---- {A76B2D4F-C424-410B-A6F1-7831B5E38E7D}.Release.ActiveCfg = Release|Win32 {29B8A199-09AD-42A5-ACA5-6710E592D57C}.Debug.ActiveCfg = Debug|.NET + {29B8A199-09AD-42A5-ACA5-6710E592D57C}.Debug.Build.0 = Debug|.NET {29B8A199-09AD-42A5-ACA5-6710E592D57C}.Release.ActiveCfg = Release|.NET {29B8A199-09AD-42A5-ACA5-6710E592D57C}.Release.Build.0 = Release|.NET {4F5CFD04-88C6-400E-B0EB-9D03F456C631}.Debug.ActiveCfg = Debug|.NET + {4F5CFD04-88C6-400E-B0EB-9D03F456C631}.Debug.Build.0 = Debug|.NET {4F5CFD04-88C6-400E-B0EB-9D03F456C631}.Release.ActiveCfg = Release|.NET {4F5CFD04-88C6-400E-B0EB-9D03F456C631}.Release.Build.0 = Release|.NET *************** *** 53,61 **** {B420A3A2-DB67-4C4A-99DE-5577C4C04B3F}.Release.ActiveCfg = Release|.NET {29608312-FA1C-4E7D-85C9-73B5D4443DC9}.Debug.ActiveCfg = Debug|.NET - {29608312-FA1C-4E7D-85C9-73B5D4443DC9}.Debug.Build.0 = Debug|.NET {29608312-FA1C-4E7D-85C9-73B5D4443DC9}.Release.ActiveCfg = Release|.NET {29608312-FA1C-4E7D-85C9-73B5D4443DC9}.Release.Build.0 = Release|.NET {5E2129EC-24CE-4DD4-BB82-8BBE7F2F2FC5}.Debug.ActiveCfg = Debug - {5E2129EC-24CE-4DD4-BB82-8BBE7F2F2FC5}.Debug.Build.0 = Debug {5E2129EC-24CE-4DD4-BB82-8BBE7F2F2FC5}.Release.ActiveCfg = Release {5E2129EC-24CE-4DD4-BB82-8BBE7F2F2FC5}.Release.Build.0 = Release --- 57,63 ---- |
From: Clayton H. <dr...@us...> - 2005-03-28 06:24:47
|
Update of /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Console/SharpCvsLib/Console In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv432/src/ICSharpCode.Console/SharpCvsLib/Console Modified Files: ConsoleMain.cs Log Message: Changed the import console command to not import all files by default. Also fixed a bug in the parser routine. Index: ConsoleMain.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Console/SharpCvsLib/Console/ConsoleMain.cs,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** ConsoleMain.cs 3 Feb 2005 08:45:53 -0000 1.32 --- ConsoleMain.cs 28 Mar 2005 06:24:37 -0000 1.33 *************** *** 211,215 **** return; } catch (Exception e) { ! ExitProgram("Exception parsing command.", e); } --- 211,215 ---- return; } catch (Exception e) { ! ExitProgram(string.Format("Exception parsing command: {0}", e.Message)); } |
From: Clayton H. <dr...@us...> - 2005-03-28 06:24:47
|
Update of /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode/SharpCvsLib/Commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv432/src/ICSharpCode/SharpCvsLib/Commands Modified Files: ImportModuleCommand.cs Log Message: Changed the import console command to not import all files by default. Also fixed a bug in the parser routine. Index: ImportModuleCommand.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode/SharpCvsLib/Commands/ImportModuleCommand.cs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ImportModuleCommand.cs 14 Jan 2005 09:09:21 -0000 1.9 --- ImportModuleCommand.cs 28 Mar 2005 06:24:37 -0000 1.10 *************** *** 34,37 **** --- 34,38 ---- using System.Collections; using System.IO; + using System.Text.RegularExpressions; using ICSharpCode.SharpCvsLib.Attributes; *************** *** 53,58 **** private WorkingDirectory workingdirectory; private string logmessage; ! private string vendor = "vendor"; ! private string release = "release"; private readonly ILog LOGGER = --- 54,59 ---- private WorkingDirectory workingdirectory; private string logmessage; ! private string vendor = "tcvs-vendor"; ! private string release = "tcvs-release"; private readonly ILog LOGGER = *************** *** 63,72 **** /// </summary> public string LogMessage { ! get { ! return logmessage; ! } ! set { ! logmessage = value; ! } } --- 64,69 ---- /// </summary> public string LogMessage { ! get { return logmessage; } ! set { logmessage = value; } } *************** *** 75,83 **** /// </summary> public string VendorString { ! get { ! return vendor; ! } ! set { ! vendor = value; } } --- 72,81 ---- /// </summary> public string VendorString { ! get { return vendor; } ! set { ! if (null == value || !Regex.IsMatch(value, @"[\w]")) { ! throw new ArgumentException("Value must start with a letter."); ! } ! vendor = value; } } *************** *** 87,95 **** /// </summary> public string ReleaseString { ! get { ! return release; ! } ! set { ! release = value; } } --- 85,94 ---- /// </summary> public string ReleaseString { ! get { return release; } ! set { ! if (null == value || !Regex.IsMatch(value, @"[\w]")) { ! throw new ArgumentException("Value must start with a letter."); ! } ! release = value; } } *************** *** 100,105 **** /// <param name="workingdirectory"></param> /// <param name="logmessage"></param> ! public ImportModuleCommand(WorkingDirectory workingdirectory, string logmessage) ! { this.logmessage = logmessage; this.workingdirectory = workingdirectory; --- 99,103 ---- /// <param name="workingdirectory"></param> /// <param name="logmessage"></param> ! public ImportModuleCommand(WorkingDirectory workingdirectory, string logmessage){ this.logmessage = logmessage; this.workingdirectory = workingdirectory; *************** *** 110,115 **** /// </summary> /// <param name="connection"></param> ! public void Execute(ICommandConnection connection) ! { //connection.SubmitRequest(new CaseRequest()); connection.SubmitRequest(new ArgumentRequest("-b")); --- 108,112 ---- /// </summary> /// <param name="connection"></param> ! public void Execute(ICommandConnection connection){ //connection.SubmitRequest(new CaseRequest()); connection.SubmitRequest(new ArgumentRequest("-b")); *************** *** 118,123 **** connection.SubmitRequest(new ArgumentRequest(logmessage)); - LOGGER.Info("IMPORT START"); - foreach (DictionaryEntry folder in workingdirectory.Folders) { this.SetDirectory(connection, (Folder)folder.Value); --- 115,118 ---- *************** *** 132,138 **** connection.SubmitRequest(new ImportRequest()); - if (LOGGER.IsDebugEnabled) { - LOGGER.Debug ("IMPORT END"); - } } --- 127,130 ---- |
From: Clayton H. <dr...@us...> - 2005-03-28 06:24:47
|
Update of /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode/SharpCvsLib/Misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv432/src/ICSharpCode/SharpCvsLib/Misc Modified Files: WorkingDirectory.cs Log Message: Changed the import console command to not import all files by default. Also fixed a bug in the parser routine. Index: WorkingDirectory.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode/SharpCvsLib/Misc/WorkingDirectory.cs,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** WorkingDirectory.cs 7 Feb 2005 15:05:37 -0000 1.27 --- WorkingDirectory.cs 28 Mar 2005 06:24:37 -0000 1.28 *************** *** 117,121 **** get { if (this.HasOverrideDirectory) { ! return this.OverrideDirectory; } else { return this.repositoryname; --- 117,121 ---- get { if (this.HasOverrideDirectory) { ! return this.OverrideDirectory; } else { return this.repositoryname; |
Update of /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Console/SharpCvsLib/Console/Parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv690/src/ICSharpCode.Console/SharpCvsLib/Console/Parser Modified Files: AddCommandParser.cs Command.cs CommandLineParser.cs CommandParserFactory.cs Usage.cs Log Message: Made the help commands more dynamic by making comparing all commands against commands that implement the ICommand interface. Index: CommandLineParser.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Console/SharpCvsLib/Console/Parser/CommandLineParser.cs,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** CommandLineParser.cs 7 Feb 2005 15:05:34 -0000 1.45 --- CommandLineParser.cs 28 Mar 2005 04:24:10 -0000 1.46 *************** *** 391,399 **** case "list": case "ls": ! factory = ! new CommandParserFactory("ls", arguments, ! this.cvsRoot, this.currentWorkingDirectory); ! ! parser = factory.GetCommandParser(); i = arguments.Length; command = parser.CreateCommand(); --- 391,395 ---- case "list": case "ls": ! parser = CommandParserFactory.GetCommandParser("ls"); i = arguments.Length; command = parser.CreateCommand(); *************** *** 482,490 **** string[] commandArgs = new string[arguments.Length - i]; Array.Copy(arguments, i, commandArgs, 0, arguments.Length - i); ! factory = ! new CommandParserFactory("status", commandArgs, ! this.cvsRoot, this.currentWorkingDirectory); ! ! parser = factory.GetCommandParser(); i = arguments.Length; command = parser.CreateCommand(); --- 478,483 ---- string[] commandArgs = new string[arguments.Length - i]; Array.Copy(arguments, i, commandArgs, 0, arguments.Length - i); ! parser = ! CommandParserFactory.GetCommandParser("status"); i = arguments.Length; command = parser.CreateCommand(); *************** *** 527,536 **** break; case "xml": ! factory = ! new CommandParserFactory("xml", arguments, ! this.cvsRoot, this.currentWorkingDirectory); ! ! // TODO: Move this outside of case statement when all commands use same pattern ! parser = factory.GetCommandParser(); i = arguments.Length; command = parser.CreateCommand(); --- 520,524 ---- break; case "xml": ! parser = CommandParserFactory.GetCommandParser("xml"); i = arguments.Length; command = parser.CreateCommand(); *************** *** 582,589 **** i++; string command = arguments[i]; ! CommandParserFactory factory = ! new CommandParserFactory(command, arguments, this.cvsRoot, ! this.currentWorkingDirectory); ! ICommandParser commandParser = factory.GetCommandParser (); System.Console.WriteLine(commandParser.Usage); return true; --- 570,575 ---- i++; string command = arguments[i]; ! ICommandParser commandParser = ! CommandParserFactory.GetCommandParser(command); System.Console.WriteLine(commandParser.Usage); return true; Index: AddCommandParser.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Console/SharpCvsLib/Console/Parser/AddCommandParser.cs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** AddCommandParser.cs 7 Feb 2005 15:05:34 -0000 1.9 --- AddCommandParser.cs 28 Mar 2005 04:24:10 -0000 1.10 *************** *** 108,118 **** /// <summary> - /// The add command is implemented in the library and commandline parser. - /// </summary> - public override bool Implemented { - get {return true;} - } - - /// <summary> /// Create the command object that will be used to act on the repository. /// </summary> --- 108,111 ---- Index: Usage.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Console/SharpCvsLib/Console/Parser/Usage.cs,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Usage.cs 1 Nov 2004 21:23:27 -0000 1.14 --- Usage.cs 28 Mar 2005 04:24:10 -0000 1.15 *************** *** 102,106 **** command.CommandName, command.Description)); ! if (!command.Implemented) { commandMenu.Append (" (NOT IMPLEMENTED)"); } --- 102,107 ---- command.CommandName, command.Description)); ! if (null == ! CommandParserFactory.GetCommandParser(command.CommandName)) { commandMenu.Append (" (NOT IMPLEMENTED)"); } *************** *** 165,169 **** command.First, command.Nick1, command.Nick2); msg.Append (syn_output); ! if (!command.Implemented) { msg.Append (" (NOT IMPLEMENTED)"); } --- 166,170 ---- command.First, command.Nick1, command.Nick2); msg.Append (syn_output); ! if (CommandParserFactory.GetCommandParser(command.CommandName) == null) { msg.Append (" (NOT IMPLEMENTED)"); } Index: Command.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Console/SharpCvsLib/Console/Parser/Command.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Command.cs 3 Aug 2004 23:47:20 -0000 1.6 --- Command.cs 28 Mar 2005 04:24:10 -0000 1.7 *************** *** 96,107 **** } - /// <summary> - /// <code>true</code> if the command is implemented, <code>false</code> otherwise. - /// </summary> - public bool Implemented { - get {return this.implemented;} - set {this.implemented = value;} - } - /// <summary>Create a new command.</summary> /// <param name="first">Primary command name.</param> --- 96,99 ---- Index: CommandParserFactory.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Console/SharpCvsLib/Console/Parser/CommandParserFactory.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** CommandParserFactory.cs 4 Aug 2004 00:48:08 -0000 1.7 --- CommandParserFactory.cs 28 Mar 2005 04:24:10 -0000 1.8 *************** *** 53,90 **** /// </summary> public class CommandParserFactory { - - private bool showUsage; - /// <summary> - /// <code>true</code> if the help/usage information should be displayed for this command. - /// </summary> - public bool ShowUsage { - get {return this.showUsage;} - set {this.showUsage = value;} - } - - private string command; - private string[] args; - private CvsRoot cvsRoot; - private WorkingDirectory workingDirectory; - private static SortedList allCommands; - private static SortedList availableCommands; - private static readonly ILog LOGGER = LogManager.GetLogger(typeof(CommandParserFactory)); ! /// <summary> ! /// Creates a new instance of the command parser. ! /// </summary> ! /// <param name="command"></param> ! /// <param name="args"></param> ! /// <param name="cvsRoot"></param> ! /// <param name="workingDirectory"></param> ! public CommandParserFactory(string command, string[] args, ! CvsRoot cvsRoot, WorkingDirectory workingDirectory){ ! this.command = command; ! this.args = GetArgsAfterCommandName(args); ! this.cvsRoot = cvsRoot; ! this.workingDirectory = workingDirectory; ! } ! private static SortedList commandParsers; private static SortedList CommandParsers { --- 53,59 ---- /// </summary> public class CommandParserFactory { private static readonly ILog LOGGER = LogManager.GetLogger(typeof(CommandParserFactory)); ! private static SortedList allCommands; private static SortedList commandParsers; private static SortedList CommandParsers { *************** *** 102,106 **** Type[] types = cvsLibAssembly.GetTypes(); foreach(Type type in types) { ! if (type.IsClass && type.GetInterface("ICommandParser") != null && !type.IsAbstract) { try { ICommandParser commandParser = (ICommandParser)Activator.CreateInstance(type); --- 71,77 ---- Type[] types = cvsLibAssembly.GetTypes(); foreach(Type type in types) { ! if (type.IsClass && ! type.GetInterface("ICommandParser") != null && ! !type.IsAbstract) { try { ICommandParser commandParser = (ICommandParser)Activator.CreateInstance(type); *************** *** 117,139 **** } - /// <summary> - /// Gets a list of available commands. Available commands are cvs commands that are currently - /// implemented in #cvslib and have an associated command parser in the commandline client. - /// </summary> - public static SortedList AvailableCommands { - get { - if (null == availableCommands) { - availableCommands = new SortedList(); - foreach (ICommandParser commandParser in CommandParsers.Values) { - Command command = new Command(commandParser.CommandName, commandParser.CommandDescription, commandParser.Nicks); - command.Implemented = commandParser.Implemented; - availableCommands.Add(command.CommandName, command); - } - } - return availableCommands; - - } - } - private static Command GetCom (string commandName, string commandDescription, string[] args) { ArrayList nicks = new ArrayList(); --- 88,91 ---- *************** *** 200,207 **** allCommands.Add("watchers", GetCom("watchers", "See who is watching a file", new ArrayList())); allCommands.Add("xml", GetCom("xml", "Create an xml report containing the history information for a module", new ArrayList())); - - foreach (Command command in AvailableCommands.Values) { - allCommands[command.CommandName] = command; - } } return allCommands; --- 152,155 ---- *************** *** 230,268 **** /// <returns>A new instance of the specified command parser that implements the /// <see cref="ICommandParser"/> interface.</returns> ! public ICommandParser GetCommandParser () { ! ICommandParser parser = (ICommandParser)CommandParsers[command]; ! ! if (null == parser) { ! foreach (ICommandParser tp in AvailableCommands.Values) { ! foreach (string nick in tp.Nicks) { ! if (nick.Equals(command)) { ! parser = tp; ! } ! } ! if (null != parser) { ! break; ! } ! } ! } ! ! if (null == parser) { ! System.Console.WriteLine(String.Format("Command {0} not implemented.", command)); ! System.Environment.Exit(-1); ! } ! ! parser.Args = this.args; ! parser.CvsRoot = this.cvsRoot; ! parser.CurrentWorkingDirectory = this.workingDirectory; ! ! try { ! parser.ParseOptions(); ! } catch (CommandLineParseException e) { ! string msg = ! String.Format("{0}{1}{2}", ! e.Message, Environment.NewLine, parser.Usage); ! System.Console.WriteLine(msg); ! } ! ! return parser; } } --- 178,183 ---- /// <returns>A new instance of the specified command parser that implements the /// <see cref="ICommandParser"/> interface.</returns> ! public static ICommandParser GetCommandParser (string command) { ! return (ICommandParser)CommandParsers[command]; } } |
From: Clayton H. <dr...@us...> - 2005-03-22 06:15:12
|
Update of /cvsroot/sharpcvslib/sharpcvslib/build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22474/build Modified Files: Ccnet.xml Log Message: Updated Ccnet.xml file. Index: Ccnet.xml =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/build/Ccnet.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Ccnet.xml 22 Mar 2005 06:09:52 -0000 1.3 --- Ccnet.xml 22 Mar 2005 06:15:04 -0000 1.4 *************** *** 1,3 **** --- 1,4 ---- <project name="Ccnet" default="Build"> + <include buildfile="SharpCvsLib.common.xml"/> <property name="frameworks" value="net-1.1 mono-1.0"/> <target name="Build"> |
From: Clayton H. <dr...@us...> - 2005-03-22 06:10:02
|
Update of /cvsroot/sharpcvslib/sharpcvslib/build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19210/build Modified Files: Ccnet.xml Log Message: Updated Ccnet.xml file. Index: Ccnet.xml =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/build/Ccnet.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Ccnet.xml 22 Mar 2005 06:05:22 -0000 1.2 --- Ccnet.xml 22 Mar 2005 06:09:52 -0000 1.3 *************** *** 10,14 **** </nant> ! <zip zipfile="${dir.ccnet.log}/${label-to-apply}/SharpCvsLib-${framework}-${platform-get-name()}.zip"> <fileset basedir="${dir.dist}/src"> <include name="**" /> --- 10,14 ---- </nant> ! <zip zipfile="${dir.ccnet.log}/${label-to-apply}/SharpCvsLib-${framework}-${platform::get-name()}.zip"> <fileset basedir="${dir.dist}/src"> <include name="**" /> |
From: Clayton H. <dr...@us...> - 2005-03-22 06:05:32
|
Update of /cvsroot/sharpcvslib/sharpcvslib/build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16664/build Modified Files: Ccnet.xml Log Message: Updated Ccnet.xml file. Index: Ccnet.xml =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/build/Ccnet.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Ccnet.xml 22 Mar 2005 05:09:41 -0000 1.1 --- Ccnet.xml 22 Mar 2005 06:05:22 -0000 1.2 *************** *** 2,5 **** --- 2,6 ---- <property name="frameworks" value="net-1.1 mono-1.0"/> <target name="Build"> + <call target="CreateBuildText"/> <foreach item="String" in="${frameworks}" property="framework" delim=" "> <nant buildfile="SharpCvsLib.build" target="clean dist" verbose="true" inheritall="false"> *************** *** 8,17 **** </properties> </nant> </foreach> <if test="${property::exists('dir.ccnet.log')}"> - <call target="CreateBuildText"/> - <call target="Package"/> - <!-- You will need to download junction (for symlinks) here: --- 9,28 ---- </properties> </nant> + + <zip zipfile="${dir.ccnet.log}/${label-to-apply}/SharpCvsLib-${framework}-${platform-get-name()}.zip"> + <fileset basedir="${dir.dist}/src"> + <include name="**" /> + <exclude name=".externalToolBuilders/**"/> + </fileset> + <fileset basedir="${dir.dist}/bin" prefix="bin"> + <include name="bin/**"/> + </fileset> + <fileset basedir="${dir.ccnet.log}"> + <include name="build.txt" /> + </fileset> + </zip> </foreach> <if test="${property::exists('dir.ccnet.log')}"> <!-- You will need to download junction (for symlinks) here: *************** *** 29,50 **** </target> - <target name="Package"> - <mkdir dir="${ccnet.log.dir}/${label-to-apply}"/> - <zip zipfile="${ccnet.log.dir}/${label-to-apply}/${assembly.version}-src.zip"> - <fileset basedir="${dir.dist}/src"> - <include name="**" /> - <exclude name=".externalToolBuilders/**"/> - </fileset> - <fileset basedir="${dir.dist}/bin" prefix="bin"> - <include name="bin/**"/> - </fileset> - </zip> - <zip zipfile="${ccnet.log.dir}/${label-to-apply}/${assembly.version}-bin.zip"> - <fileset basedir="${dir.dist}/bin"> - <include name="**" /> - </fileset> - </zip> - </target> - <target name="CreateBuildText"> <sysinfo/> --- 40,43 ---- |
From: Clayton H. <dr...@us...> - 2005-03-22 05:09:59
|
Update of /cvsroot/sharpcvslib/sharpcvslib/build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18717/build Modified Files: SharpCvsLib.build Added Files: Ccnet.xml Log Message: Added Ccnet.xml file for integration build. --- NEW FILE: Ccnet.xml --- <project name="Ccnet" default="Build"> <property name="frameworks" value="net-1.1 mono-1.0"/> <target name="Build"> <foreach item="String" in="${frameworks}" property="framework" delim=" "> <nant buildfile="SharpCvsLib.build" target="clean dist" verbose="true" inheritall="false"> <properties> <property name="nant.settings.currentframework" value="${framework}" readonly="true" /> </properties> </nant> </foreach> <if test="${property::exists('dir.ccnet.log')}"> <call target="CreateBuildText"/> <call target="Package"/> <!-- You will need to download junction (for symlinks) here: http://www.sysinternals.com/ntw2k/source/misc.shtml#junction --> <exec program="junction.exe"> <arg value="-d"/> <arg value="${dir.ccnet.log}/latest"/> </exec> <exec program="junction.exe"> <arg value="${dir.ccnet.log}/latest"/> <arg value="${dir.ccnet.log}/${label-to-apply}"/> </exec> </if> </target> <target name="Package"> <mkdir dir="${ccnet.log.dir}/${label-to-apply}"/> <zip zipfile="${ccnet.log.dir}/${label-to-apply}/${assembly.version}-src.zip"> <fileset basedir="${dir.dist}/src"> <include name="**" /> <exclude name=".externalToolBuilders/**"/> </fileset> <fileset basedir="${dir.dist}/bin" prefix="bin"> <include name="bin/**"/> </fileset> </zip> <zip zipfile="${ccnet.log.dir}/${label-to-apply}/${assembly.version}-bin.zip"> <fileset basedir="${dir.dist}/bin"> <include name="**" /> </fileset> </zip> </target> <target name="CreateBuildText"> <sysinfo/> <echo file="${dir.ccnet.log}/${label-to-apply}/build.txt"> Sporadicism Build Server (http://www.build.sporadicism.com) ----------------------------------------------------------- Computer: ${sys.env.COMPUTERNAME} Date: ${datetime::now()} Label: ${label-to-apply} Frameworks: ${frameworks} OS: ${environment::get-operating-system()} </echo> </target> </project> Index: SharpCvsLib.build =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/build/SharpCvsLib.build,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** SharpCvsLib.build 14 Feb 2005 01:38:33 -0000 1.48 --- SharpCvsLib.build 22 Mar 2005 05:09:39 -0000 1.49 *************** *** 248,251 **** --- 248,252 ---- <include name="${dir.src}**" /> <include name="${dir.tools}/nant**" /> + <include name="${dir.tools}/Builder**" /> <exclude name="${dir.doc}**" /> *************** *** 269,286 **** </target> - <target name="integration" depends="clean, dist"> - <mkdir dir="${ccnet.log.dir}/${label-to-apply}"/> - <zip zipfile="${ccnet.log.dir}/${label-to-apply}/${assembly.version}-src.zip"> - <fileset basedir="${dir.dist}/src"> - <include name="**" /> - </fileset> - </zip> - <zip zipfile="${ccnet.log.dir}/${label-to-apply}/${assembly.version}-bin.zip"> - <fileset basedir="${dir.dist}/bin"> - <include name="**" /> - </fileset> - </zip> - </target> - <target name="build-release.common" depends="clean"> <call target="dist" /> --- 270,273 ---- |
From: Imran A. <ImranA@PLANETASIA.COM> - 2005-03-15 09:03:15
|
Hi , I'm Imran. I was looking out for a C# CVS Library for usage in my .Net application when I came across NetCVSLibrary version 2.0 which is part of the isharpcode project. I'm in the process of writing a sample winforms application in C# that would invoke the basic cvs commands like checkout, commit and update. I was able to invoked the checkout command with success. The following is the code snippet for the same. CVSServerConnection connection = new CVSServerConnection(); CvsRoot cvsroot = new CvsRoot(":pserver:satinderp@172.16.69.188:/cvs/HOMESTORECVS"); WorkingDirectory workingdirectory = new WorkingDirectory(cvsroot, @"D:\\Imran\\cvs\\FileContainer_CVS", "FileContainer"); connection.Connect(workingdirectory, "password"); //check out new CheckoutModuleCommand(workingdirectory).Execute(connection); MessageBox.Show("CVS LOCAL CHECKOUT COMPLETED"); Similary I have written a code snippet to do a commit operation of the File TestForm.cs contained in the checkout directory "D:\Imran\cvs\FileContainer_CVS\FileContainer" . The following is the code snippet for the same. Unfortunately I'm not able to do the commit operation successfully. I get the error "cvs server: Up-to-date check failed for `TestForm.cs' as the ErrorMessage Response. CVSServerConnection connection = new CVSServerConnection(); CvsRoot cvsroot = new CvsRoot(":pserver:satinderp@172.16.69.188:/cvs/HOMESTORECVS"); WorkingDirectory workingdirectory = new WorkingDirectory(cvsroot,@"D:\Imran\cvs\FileContainer_CVS\FileContainer", "FileContainer"); workingdirectory.AddAllFiles(@"D:\Imran\cvs\FileContainer_CVS\FileContainer" ); MessageBox.Show(workingdirectory.Folders.Count.ToString()); connection.Connect(workingdirectory, "password"); CommitCommand2 objCommit = new CommitCommand2(workingdirectory); objCommit.LogMessage = "Test Logging"; objCommit.ReleaseString = "Release Imran 2"; objCommit.Execute(connection); Please guide me with reasons for the same or changes in the above code snippet to yield a positive result. Also if you could share any examples using the NetCVSLibrary, it would be appreciated. I've also downloaded the SharpCVSLib but I cannot use it since my application uses .Net 1.0. I'm looking forward to your help asap Thanks & Regards Imran |
From: Imran A. <ImranA@PLANETASIA.COM> - 2005-03-15 09:00:22
|
Hi , I'm Imran. I was looking out for a C# CVS Library for usage in my .Net application when I came across NetCVSLibrary version 2.0 which is part of the isharpcode project. I'm in the process of writing a sample winforms application in C# that would invoke the basic cvs commands like checkout, commit and update. I was able to invoked the checkout command with success. The following is the code snippet for the same. CVSServerConnection connection = new CVSServerConnection(); CvsRoot cvsroot = new CvsRoot(":pserver:satinderp@172.16.69.188:/cvs/HOMESTORECVS"); WorkingDirectory workingdirectory = new WorkingDirectory(cvsroot, @"D:\\Imran\\cvs\\FileContainer_CVS", "FileContainer"); connection.Connect(workingdirectory, "password"); //check out new CheckoutModuleCommand(workingdirectory).Execute(connection); MessageBox.Show("CVS LOCAL CHECKOUT COMPLETED"); Similary I have written a code snippet to do a commit operation of the File TestForm.cs contained in the checkout directory "D:\Imran\cvs\FileContainer_CVS\FileContainer" . The following is the code snippet for the same. Unfortunately I'm not able to do the commit operation successfully. I get the error "cvs server: Up-to-date check failed for `TestForm.cs' as the ErrorMessage Response. CVSServerConnection connection = new CVSServerConnection(); CvsRoot cvsroot = new CvsRoot(":pserver:satinderp@172.16.69.188:/cvs/HOMESTORECVS"); WorkingDirectory workingdirectory = new WorkingDirectory(cvsroot,@"D:\Imran\cvs\FileContainer_CVS\FileContainer", "FileContainer"); workingdirectory.AddAllFiles(@"D:\Imran\cvs\FileContainer_CVS\FileContainer" ); MessageBox.Show(workingdirectory.Folders.Count.ToString()); connection.Connect(workingdirectory, "password"); CommitCommand2 objCommit = new CommitCommand2(workingdirectory); objCommit.LogMessage = "Test Logging"; objCommit.ReleaseString = "Release Imran 2"; objCommit.Execute(connection); Please guide me with reasons for the same or changes in the above code snippet to yield a positive result. Also if you could share any examples using the NetCVSLibrary, it would be appreciated. I've also downloaded the SharpCVSLib but I cannot use it since my application uses .Net 1.0. I'm looking forward to your help asap Thanks & Regards Imran |
From: John M. <mur...@us...> - 2005-03-06 02:56:06
|
Update of /cvsroot/sharpcvslib/sharpcvslib/src/SharpCvsAddIn/Resources/1033 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18649/Resources/1033 Modified Files: app-strings.txt Log Message: added solution update processing Index: app-strings.txt =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/SharpCvsAddIn/Resources/1033/app-strings.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** app-strings.txt 6 Mar 2005 01:40:25 -0000 1.4 --- app-strings.txt 6 Mar 2005 02:55:55 -0000 1.5 *************** *** 65,67 **** --- 65,69 ---- MSGBOX_QUERY_WAITFORCLOSE=The CVS add-in still has some jobs that are not finished. Do you want to keep waiting until they are done? MSGBOX_EXCEPTION_CVS_CHECKOUT=An error occured during CVS checkout. Description = {0} + MSGBOX_EXCEPTION_SOLUTION_EXPLORER=An error occured while updating the solution explorer. Description = {0} + MSGBOX_EXCEPTION_CVS_UPDATE=An error occured during CVS update. Description = {0} MSGBOX_MISSING_MODULE=The CVS Module name is missing. |
From: John M. <mur...@us...> - 2005-03-06 02:56:06
|
Update of /cvsroot/sharpcvslib/sharpcvslib/src/SharpCvsAddIn/UI In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18649/UI Modified Files: SolutionExplorer.cs Log Message: added solution update processing Index: SolutionExplorer.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/SharpCvsAddIn/UI/SolutionExplorer.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SolutionExplorer.cs 26 Feb 2005 23:50:58 -0000 1.3 --- SolutionExplorer.cs 6 Mar 2005 02:55:56 -0000 1.4 *************** *** 53,57 **** public void Refresh() { ! root_ = StatusGraph.GetRoot( controller_ ); } --- 53,70 ---- public void Refresh() { ! treeview_.LockWindowUpdate(true); ! try ! { ! root_ = StatusGraph.GetRoot( controller_ ); ! } ! catch( Exception e ) ! { ! log_.Error( "An exception was thrown while updating the solution explorer", e ); ! controller_.UIShell.ExceptionMessage( ! string.Format(controller_.GetLocalizedString("MSGBOX_EXCEPTION_SOLUTION_EXPLORER"), ! e.Message )); ! } ! ! treeview_.LockWindowUpdate(false); } |
From: John M. <mur...@us...> - 2005-03-06 02:56:06
|
Update of /cvsroot/sharpcvslib/sharpcvslib/src/SharpCvsAddIn/Commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18649/Commands Modified Files: UpdateCommand.cs Log Message: added solution update processing Index: UpdateCommand.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/SharpCvsAddIn/Commands/UpdateCommand.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** UpdateCommand.cs 6 Mar 2005 01:40:04 -0000 1.2 --- UpdateCommand.cs 6 Mar 2005 02:55:54 -0000 1.3 *************** *** 44,47 **** --- 44,49 ---- { log_.Debug( string.Format("Job {0} is complete", ((IJob)job).Name )); + CvsUpdateFolderJob updateJob = (CvsUpdateFolderJob)job; + updateJob.FinishJob(); } |
From: John M. <mur...@us...> - 2005-03-06 02:56:05
|
Update of /cvsroot/sharpcvslib/sharpcvslib/src/SharpCvsAddIn/Jobs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18649/Jobs Modified Files: CvsUpdateJob.cs Log Message: added solution update processing Index: CvsUpdateJob.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/SharpCvsAddIn/Jobs/CvsUpdateJob.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CvsUpdateJob.cs 6 Mar 2005 01:50:43 -0000 1.1 --- CvsUpdateJob.cs 6 Mar 2005 02:55:55 -0000 1.2 *************** *** 27,30 **** --- 27,47 ---- } + public void FinishJob() + { + log_.Debug( "called finish job" ); + + if( exception_ == null ) + { + controller_.SolutionExplorer.Refresh(); + } + else + { + log_.Error( "Exception in FinishJob", exception_ ); + controller_.UIShell.ExceptionMessage( + string.Format(controller_.GetLocalizedString("MSGBOX_EXCEPTION_CVS_UPDATE"), + exception_.Message )); + } + } + #region IJob Members |
From: John M. <mur...@us...> - 2005-03-06 01:51:06
|
Update of /cvsroot/sharpcvslib/sharpcvslib/src/SharpCvsAddIn/Jobs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4379 Added Files: CvsUpdateJob.cs Log Message: initial add --- NEW FILE: CvsUpdateJob.cs --- using System; using ICSharpCode.SharpCvsLib.Client; using ICSharpCode.SharpCvsLib.Misc; using ICSharpCode.SharpCvsLib.Commands; using log4net; using System.Windows.Forms; using System.IO; namespace SharpCvsAddIn.Jobs { public class CvsUpdateFolderJob : IJob { private static readonly ILog log_ = LogManager.GetLogger( typeof(CvsUpdateFolderJob)); WorkingDirectory workingDirectory_ = null; string password_ = string.Empty; IController controller_ = null; // if an exception occurs store it here and pass it back to the calling thread. Exception exception_ = null; public CvsUpdateFolderJob( IController cont, WorkingDirectory wd, string password ) { controller_ = cont; workingDirectory_ = wd; password_ = password; } #region IJob Members public string Name { get { return "CVS Update Job"; } } public object DoWork() { log_.Debug(">>>>>>>>>>>> Starting CVS update >>>>>>>>>>>"); CVSServerConnection cvsConnection = null; try { UpdateCommand2 cmd = new UpdateCommand2( workingDirectory_ ); cvsConnection = new CVSServerConnection( workingDirectory_ ); controller_.OutputPane.RegisterCvsConnection( cvsConnection ); cvsConnection.Connect( workingDirectory_, password_ ); cmd.Execute( cvsConnection ); log_.Debug(">>>>>>>>>>>>>> CVS update complete >>>>>>>>>>>"); } catch(Exception e ) { this.exception_ = e; log_.Error( "An error occurred during cvs update job.", e ); } if(cvsConnection != null) cvsConnection.Close(); return this; } #endregion #region ICloneable Members public object Clone() { // TODO: Add CvsUpdateJob.Clone implementation return this; } #endregion } } |
From: John M. <mur...@us...> - 2005-03-06 01:41:04
|
Update of /cvsroot/sharpcvslib/sharpcvslib/src/SharpCvsAddIn/Jobs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1947/Jobs Modified Files: CvsCheckout.cs Log Message: refactored classes that manage isolated storage and implemented solution update command Index: CvsCheckout.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/SharpCvsAddIn/Jobs/CvsCheckout.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CvsCheckout.cs 28 Feb 2005 00:09:54 -0000 1.1 --- CvsCheckout.cs 6 Mar 2005 01:40:05 -0000 1.2 *************** *** 25,38 **** ! public CvsCheckoutJob( IController controller, string connectionString, ! string moduleName, string solutionLocation, string password, string solutionPath, string tag ) { controller_ = controller; ! connectionString_ = connectionString; ! moduleName_ = moduleName; ! solutionLocation_ = solutionLocation; ! password_ = password; ! solutionPath_ = solutionPath; ! tag_ = tag; } --- 25,38 ---- ! public CvsCheckoutJob( IController controller ) { controller_ = controller; ! connectionString_ = controller.CurrentConnection.ConnectionString; ! moduleName_ = controller.CurrentModule.Name; ! solutionLocation_ = controller.CurrentConnection.WorkingDirectory; ! password_ = controller.CurrentConnection.Password; ! solutionPath_ = Path.Combine( controller.CurrentConnection.WorkingDirectory, controller.CurrentModule.Name); ! // TODO - implement tags ! //tag_ = tag; } *************** *** 132,142 **** // ok, if we are this far, we checked out the solution from cvs, lets open it controller_.OpenSolution(Path.Combine(this.solutionPath_, solutionName )); ! // save user actions ! Module m = controller_.Model.Roots.CurrentRoot.AddModule( this.moduleName_ ); ! if( this.tag_ != string.Empty ) ! { ! m.AddTag( this.tag_ ); ! } ! controller_.Model.Save(); } --- 132,137 ---- // ok, if we are this far, we checked out the solution from cvs, lets open it controller_.OpenSolution(Path.Combine(this.solutionPath_, solutionName )); ! // everything worked, write user changes to modules path etc ! // to persistant storage controller_.Model.Save(); } |
Update of /cvsroot/sharpcvslib/sharpcvslib/src/SharpCvsAddIn In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1947 Modified Files: Controller.cs FormOpenSolutionFromCvs.cs FormSetCvsConnection.cs IController.cs Model.cs SharpCvsAddIn.csproj Log Message: refactored classes that manage isolated storage and implemented solution update command Index: IController.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/SharpCvsAddIn/IController.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** IController.cs 28 Feb 2005 00:09:54 -0000 1.3 --- IController.cs 6 Mar 2005 01:40:03 -0000 1.4 *************** *** 22,25 **** --- 22,38 ---- EnvDTE._DTE DTE { get; } + /// <summary> + /// Gets or sets the current cvs repository + /// </summary> + Persistance.Connection CurrentConnection { get; set; } + /// <summary> + /// Gets or sets that last module that we accessed + /// </summary> + Persistance.Module CurrentModule { get; set; } + /// <summary> + /// Gets or sets the last tag or branch we used + /// </summary> + string CurrentTag { get; set; } + /// <summary> /// The UI shell. *************** *** 39,42 **** --- 52,60 ---- void HandleSolutionOpenEvent(); + /// <summary> + /// solution is under cvs source control + /// </summary> + bool SolutionInCVS {get;} + /// <summary> /// The SolutionExplorer object. Index: SharpCvsAddIn.csproj =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/SharpCvsAddIn/SharpCvsAddIn.csproj,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** SharpCvsAddIn.csproj 28 Feb 2005 04:00:56 -0000 1.6 --- SharpCvsAddIn.csproj 6 Mar 2005 01:40:03 -0000 1.7 *************** *** 303,306 **** --- 303,326 ---- BuildAction = "Compile" /> + <File + RelPath = "Jobs\CvsUpdateJob.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "Persistance\Connection.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "Persistance\Module.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File + RelPath = "Persistance\Storage.cs" + SubType = "Code" + BuildAction = "Compile" + /> <Folder RelPath = "Resources\" /> <File Index: Model.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/SharpCvsAddIn/Model.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Model.cs 12 Feb 2005 04:47:51 -0000 1.2 --- Model.cs 6 Mar 2005 01:40:03 -0000 1.3 *************** *** 18,358 **** using ICSharpCode.SharpCvsLib.Messages; namespace SharpCvsAddIn { - [Serializable] - public class ConnectionString - { - private string workingDir_ = string.Empty; - private string userName_ = string.Empty; - private string hostName_ = string.Empty; - private int port_ = CvsRoots.PORT_UNASSIGNED; - private string protocol_ = string.Empty; - private string repository_ = string.Empty; - private string password_ = string.Empty; - - #region methods - - public ConnectionString() - { - } - - public ConnectionString( string workingDir, - string userName, - string hostName, - int port, - string protocol, - string repository, - string password ) - { - workingDir_ = workingDir; - userName_ = userName; - hostName_ = hostName; - port_ = port; - protocol_ = protocol; - repository_ = repository; - password_ = password; - } - - public override int GetHashCode() - { - return string.Format("{0}{1}{2}{3}{4}{5}", workingDir_, userName_, hostName_, port_, protocol_, repository_ ).GetHashCode(); - } - - public override string ToString() - { - //:method:[[user][:password]@]hostname[:[port]][:]/path/to/repository - - StringBuilder sb = new StringBuilder(); - if( protocol_ != string.Empty ) - { - sb.AppendFormat( ":{0}:", protocol_ ); - } - - if( userName_ != string.Empty ) - { - sb.AppendFormat( "{0}@", userName_ ); - } - - if( hostName_ != string.Empty ) - { - sb.AppendFormat( "{0}:", hostName_ ); - - if( port_ > CvsRoots.PORT_UNASSIGNED ) - { - sb.AppendFormat( "{0}:", port_ ); - } - } - - sb.Append( string.Format("/{0}", repository_) ); - - Debug.WriteLine( string.Format("Connection string = {0}", sb.ToString() ) ); - - return sb.ToString(); - } - - #endregion - - public string Host - { - get{ return hostName_; } - set{ hostName_ = value; } - } - public string User - { - get{ return userName_; } - set{ userName_ = value; } - } - public string WorkingDirectory - { - get{ return workingDir_; } - set{ workingDir_ = value; } - } - public int Port - { - get{ return port_; } - set - { - port_ = value; - } - } - - public string Protocol - { - get{ return protocol_; } - set{ protocol_ = value; } - } - - public string Repository - { - get{ return repository_; } - set{ repository_ = value; } - } - - /// <summary> - /// Note that the password is not written to disk where it could be read by any text editor. - /// </summary> - [XmlIgnore] - public string Password - { - get - { - return password_; - } - set - { - password_ = value; - } - } - - } - - public class ModuleComparer : IComparer - { - #region IComparer Members - - public int Compare(object x, object y) - { - Module left = (Module)x; - Module right = (Module)y; - return string.Compare(left.module_, right.module_, false, CultureInfo.CurrentCulture); - } - - #endregion - - } - - [Serializable] - public class Module - { - public string module_ = string.Empty; - public ArrayList tags_ = new ArrayList(); - public Module() - { - } - public Module( string name ) - { - module_ = name; - } - - public void AddTag( string name ) - { - int pos = tags_.BinarySearch( name, new Comparer( CultureInfo.CurrentCulture) ); - if( pos < 0 ) - { - tags_.Insert( ~pos, name ); - } - } - } - - [Serializable] - public class CvsHistory - { - - - #region members - [XmlElement( typeof(Module) )] - public ArrayList modules_ = new ArrayList(); - - #endregion members - - #region methods - - public CvsHistory() - { - } - - internal static void AddSorted( ref ArrayList list, string itemToAdd ) - { - int pos = list.BinarySearch( itemToAdd, new Comparer( CultureInfo.CurrentCulture)); - if( pos < 0 ) - { - list.Insert( ~pos, itemToAdd ); - } - } - - public Module AddModule( string name ) - { - Module newMod = new Module( name ); - int pos = modules_.BinarySearch( newMod, new ModuleComparer() ); - if( pos < 0 ) - { - modules_.Insert( ~pos, newMod ); - return newMod; - } - - return (Module)modules_[pos]; - } - - public Module GetModule( string name ) - { - Module mod = new Module( name ); - int pos = modules_.BinarySearch( mod, new ModuleComparer()); - if( pos < 0 ) throw new ArgumentOutOfRangeException( "moduleName", name, - "No such module exists" ); - return (Module)modules_[pos]; - } - - [XmlIgnore] - public string[] ModuleNames - { - get - { - if( modules_.Count == 0 ) return null; - string[] mods = new string[ modules_.Count ]; - int i = 0; - foreach( Module m in modules_ ) - { - mods[i++] = m.module_; - } - return mods; - } - } - - #endregion - - - } - - [Serializable] - public class CvsRoots - { - [Serializable] - public class SerializablePair - { - public ConnectionString conn_ = null; - public CvsHistory hist_ = null; - public SerializablePair() - { - } - public SerializablePair(ConnectionString conn, CvsHistory hist) - { - conn_ = conn; - hist_ = hist; - } - - } - - - private Hashtable roots_ = new Hashtable(); - private ConnectionString current_ = null; - public const int PORT_UNASSIGNED = 0; - public const int PORT_DEFAULT = 2401; - - - public CvsRoots() - { - } - - public SerializablePair[] Connections - { - get - { - Debug.WriteLine( "getting roots" ); - if( roots_.Count == 0 ) return null; - - SerializablePair[] pairs = new SerializablePair[ roots_.Count ]; - - int i = 0; - foreach( ConnectionString conn in roots_.Keys ) - { - pairs[i++] = new SerializablePair( conn, (CvsHistory)roots_[conn] ); - } - - return pairs; - } - set - { - Debug.WriteLine( "setting roots" ); - Debug.Assert( value != null ); - - foreach( SerializablePair pair in value ) - { - roots_[pair.conn_] = pair.hist_; - } - - } - } - - - - public CvsHistory CurrentRoot - { - get - { - if(current_ != null ) - { - return (CvsHistory)roots_[current_]; - } - else - { - return null; - } - } - } - - - - public ConnectionString CurrentConnection - { - get - { - return current_; - } - - set - { - if( roots_[value] == null ) - { - roots_[value] = new CvsHistory(); - } - - current_ = value; - - } - } - - } /// <summary> /// Summary description for Class1. --- 18,27 ---- using ICSharpCode.SharpCvsLib.Messages; + using SharpCvsAddIn.Persistance; + namespace SharpCvsAddIn { /// <summary> /// Summary description for Class1. *************** *** 362,383 **** internal static readonly string LanguageAssemblyName = "language-assembly.dll"; internal static readonly string LanguageBaseResourceName = "app-strings"; ! internal const string STORAGE_FILE_NAME = "sharp-cvs-addin.history.xml"; public readonly ResourceManager ResourceManager; private string storageFileName_ = string.Empty; private string assemblyPath_ = string.Empty; - private CvsRoots roots_; ! public CvsRoots Roots { ! get ! { ! return roots_; ! } ! set ! { ! roots_ = value; ! } ! } --- 31,47 ---- internal static readonly string LanguageAssemblyName = "language-assembly.dll"; internal static readonly string LanguageBaseResourceName = "app-strings"; ! internal const string STORAGE_FILE_NAME = "sharp-cvs-addin4.history.xml"; public readonly ResourceManager ResourceManager; private string storageFileName_ = string.Empty; private string assemblyPath_ = string.Empty; ! private Storage storage_ = new Storage(); ! /// <summary> ! /// Returns object that handles isolated storage data for application ! /// </summary> ! public Storage Storage { ! get{ return storage_ ; } } *************** *** 398,428 **** FileMode.Open, FileAccess.Read, FileShare.Read, isf )) { ! XmlSerializer srl = new XmlSerializer(typeof(CvsRoots)); ! roots_ = (CvsRoots)srl.Deserialize(ifm); return; } } } ! } ! ! roots_ = new CvsRoots(); ! ! ! } - public ConnectionString CurrentConnection - { - get - { - return roots_.CurrentConnection; - } } ! public CvsHistory CurrentHistory { ! get ! { ! return roots_.CurrentRoot; ! } } --- 62,79 ---- FileMode.Open, FileAccess.Read, FileShare.Read, isf )) { ! XmlSerializer srl = new XmlSerializer(typeof(Persistance.Storage)); ! storage_ = (Persistance.Storage)srl.Deserialize(ifm); return; } } } ! } } ! public Connection[] Connections { ! get{ return storage_.Connections; } ! set{ storage_.Connections = value; } } *************** *** 438,443 **** FileShare.Read, isf )) { ! XmlSerializer srl = new XmlSerializer(typeof(CvsRoots)); ! srl.Serialize( isfs, roots_ ); } --- 89,94 ---- FileShare.Read, isf )) { ! XmlSerializer srl = new XmlSerializer(typeof(Persistance.Storage)); ! srl.Serialize( isfs, storage_ ); } Index: FormSetCvsConnection.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/SharpCvsAddIn/FormSetCvsConnection.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FormSetCvsConnection.cs 7 Feb 2005 04:54:09 -0000 1.1 --- FormSetCvsConnection.cs 6 Mar 2005 01:40:03 -0000 1.2 *************** *** 95,132 **** protocolList.Items.Add( new Protocol( "sspi", rm.GetString("FORM_SSPI_DESC"))); ! } ! ! /// <summary> ! /// Calls base constructor and then sets interface elements ! /// to display current connection string information ! /// </summary> ! /// <param name="currentConnection">Contains CVS connection ! /// string information.</param> ! public FormSetCvsConnection( IController controller_, ConnectionString currentConnection ) ! :this(controller_) ! { ! if( currentConnection != null ) { ! userNameTextBox.Text = currentConnection.User; ! cvsHostTxtBox.Text = currentConnection.Host; ! cvsPortTextBox.Text = currentConnection.Port.ToString(); ! cvsRootTextBox.Text = currentConnection.Repository; ! workingDirTextBox.Text = currentConnection.WorkingDirectory; ! cvsPasswordTxtBox.Text = currentConnection.Password; ! if( currentConnection.Protocol != string.Empty ) { ! foreach( object o in protocolList.Items ) { ! Protocol p = (Protocol)o; ! if( p.Name == currentConnection.Protocol ) { ! protocolList.SelectedItem = o; } } } } } /// <summary> /// Clean up any resources being used. --- 95,124 ---- protocolList.Items.Add( new Protocol( "sspi", rm.GetString("FORM_SSPI_DESC"))); ! if( controller_.CurrentConnection != null ) { ! Persistance.Connection conn = controller_.CurrentConnection; ! userNameTextBox.Text = conn.User; ! cvsHostTxtBox.Text = conn.Host; ! cvsPortTextBox.Text = conn.Port.ToString(); ! cvsRootTextBox.Text = conn.Repository; ! workingDirTextBox.Text = conn.WorkingDirectory; ! cvsPasswordTxtBox.Text = conn.Password; ! if( conn.Protocol != string.Empty ) { ! foreach( object protocol in protocolList.Items ) { ! if( ((Protocol)protocol).Name == conn.Protocol ) { ! protocolList.SelectedItem = protocol; ! break; } } } } + } + /// <summary> /// Clean up any resources being used. *************** *** 396,399 **** --- 388,393 ---- } + + allowClose_ = true; Index: Controller.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/SharpCvsAddIn/Controller.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Controller.cs 28 Feb 2005 00:09:54 -0000 1.6 --- Controller.cs 6 Mar 2005 01:40:03 -0000 1.7 *************** *** 3,6 **** --- 3,7 ---- using EnvDTE; using SharpCvsAddIn.UI; + using System.IO; *************** *** 25,28 **** --- 26,30 ---- private JobQueue jobs_ = null; + public Controller(EnvDTE._DTE dte, EnvDTE.AddIn addin,IErrorHandler errorHandler) { *************** *** 93,96 **** --- 95,137 ---- } + /// <summary> + /// Used to store information about the cvs repository that + /// we are currently connected to + /// </summary> + public Persistance.Connection CurrentConnection + { + get + { + return model_.Storage.CurrentConnection; + } + set + { + model_.Storage.CurrentConnection = value; + } + } + + public Persistance.Module CurrentModule + { + get + { + return model_.Storage.CurrentModule; + } + set + { + model_.Storage.CurrentModule = value; + } + } + + public string CurrentTag + { + get + { + return model_.Storage.CurrentTag; + } + set + { + model_.Storage.CurrentTag = value; + } + } public Model Model { get{ return model_; } } *************** *** 190,199 **** public void SolutionOpened() { ! // TODO: Add AddInController.SolutionOpened implementation } public void SolutionClosing() { ! // TODO: Add AddInController.SolutionClosing implementation } --- 231,240 ---- public void SolutionOpened() { ! solutionOpen_ = true; } public void SolutionClosing() { ! solutionOpen_ = false; } *************** *** 218,221 **** --- 259,274 ---- } + public bool SolutionInCVS + { + get + { + // if there is a CVS subdirectory the solution is under source control + string solutionPath = Path.GetDirectoryName(this.DTE.Solution.FileName); + string cvsPath = Path.Combine( solutionPath, "CVS" ); + FileAttributes attr = File.GetAttributes( cvsPath ); + return (int)attr != -1; + } + } + #endregion } Index: FormOpenSolutionFromCvs.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/SharpCvsAddIn/FormOpenSolutionFromCvs.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FormOpenSolutionFromCvs.cs 7 Feb 2005 04:54:09 -0000 1.1 --- FormOpenSolutionFromCvs.cs 6 Mar 2005 01:40:03 -0000 1.2 *************** *** 5,8 **** --- 5,9 ---- using System.Windows.Forms; using System.Resources; + using System.Diagnostics; using System.IO; *************** *** 35,66 **** private IController cont_; ! public FormOpenSolutionFromCvs(IController cont, string connectionString, string workingDir ) { InitializeComponent(); cont_ = cont; ! workingDir_ = workingDir; ! this.Text = cont.Model.ResourceManager.GetString( "FORM_OPEN_SOLUTION_FROM_CVS_TITLE" ); cvsConnectionStringLabel.Text = ! string.Format( "{0} - {1}", cont.Model.ResourceManager.GetString("FORM_CVS_CONNECTION_STRING"), ! connectionString ) ; ! cvsModuleLabel.Text = cont.Model.ResourceManager.GetString("FORM_CVS_MODULE"); ! slnPathLabel.Text = cont.Model.ResourceManager.GetString("FORM_SOLUTION_PATH"); ! destPathTextBox.Text = workingDir_; ! okBtn.Text = cont.Model.ResourceManager.GetString("FORM_OK_BUTTON"); ! cancelBtn.Text = cont.Model.ResourceManager.GetString("FORM_CANCEL_BUTTON"); ! cvsTagLbl.Text = cont.Model.ResourceManager.GetString( "FORM_CVS_TAG" ); ! okBtn.Text = cont.Model.ResourceManager.GetString("FORM_OK_BUTTON"); ! cancelBtn.Text = cont.Model.ResourceManager.GetString("FORM_CANCEL_BUTTON"); ! ! solutionMsg_ = cont.Model.ResourceManager.GetString("FORM_SOLUTION_DIRECTORY"); ! CvsHistory hist = cont.Model.CurrentHistory; ! string[] modules = hist.ModuleNames; ! if(modules != null ) { ! cvsModuleDropDown.Items.AddRange( modules ); } --- 36,84 ---- private IController cont_; ! public string WorkingDirectory ! { ! get ! { ! return destPathTextBox.Text.Trim(); ! } ! } ! public FormOpenSolutionFromCvs(IController cont) { InitializeComponent(); + // shouldn't be able to call this unless connection is set + Debug.Assert( cont.CurrentConnection != null ); + + cont_ = cont; ! workingDir_ = cont.CurrentConnection.WorkingDirectory; ! this.Text = cont.GetLocalizedString( "FORM_OPEN_SOLUTION_FROM_CVS_TITLE" ); cvsConnectionStringLabel.Text = ! string.Format( "{0} - {1}", cont.GetLocalizedString("FORM_CVS_CONNECTION_STRING"), ! cont.CurrentConnection.ConnectionString ) ; ! cvsModuleLabel.Text = cont.GetLocalizedString("FORM_CVS_MODULE"); ! slnPathLabel.Text = cont.GetLocalizedString("FORM_SOLUTION_PATH"); ! destPathTextBox.Text = cont.CurrentConnection.WorkingDirectory; ! okBtn.Text = cont.GetLocalizedString("FORM_OK_BUTTON"); ! cancelBtn.Text = cont.GetLocalizedString("FORM_CANCEL_BUTTON"); ! cvsTagLbl.Text = cont.GetLocalizedString( "FORM_CVS_TAG" ); ! okBtn.Text = cont.GetLocalizedString("FORM_OK_BUTTON"); ! cancelBtn.Text = cont.GetLocalizedString("FORM_CANCEL_BUTTON"); ! solutionMsg_ = cont.GetLocalizedString("FORM_SOLUTION_DIRECTORY"); ! cvsModuleDropDown.Items.AddRange( cont.CurrentConnection.ModuleNames ); ! ! if( cont.CurrentModule != null ) { ! cvsModuleDropDown.SelectedItem = cont.CurrentModule.Name; ! ! cvsTagDropDown.Items.AddRange( cont.CurrentModule.Tags ); ! ! if( cont.CurrentTag != string.Empty ) ! { ! cvsTagDropDown.SelectedItem = cont.CurrentTag; ! } } *************** *** 422,426 **** try { ! string destPath = Path.GetDirectoryName( destPathTextBox.Text ); } catch(ArgumentException) --- 440,444 ---- try { ! string destPath = Path.GetDirectoryName( this.WorkingDirectory ); } catch(ArgumentException) *************** *** 431,434 **** --- 449,465 ---- } + // make sure that user has supplied a module, don't let + // them continue if they haven't + cvsModuleDropDown.Text = cvsModuleDropDown.Text.Trim(); + if( cvsModuleDropDown.Text == string.Empty ) + { + cont_.UIShell.ExclamationMessage(this, "MSGBOX_MISSING_MODULE" ); + cvsModuleDropDown.Focus(); + return; + } + + + cvsTagDropDown.Text = cvsTagDropDown.Text.Trim(); + // everythings groovy, close the dialog *************** *** 457,461 **** else { ! browser.SelectedPath = cont_.Model.CurrentConnection.WorkingDirectory; } --- 488,492 ---- else { ! browser.SelectedPath = cont_.CurrentConnection.WorkingDirectory; } |
From: John M. <mur...@us...> - 2005-03-06 01:40:46
|
Update of /cvsroot/sharpcvslib/sharpcvslib/src/SharpCvsAddIn/Events In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1947/Events Modified Files: SolutionEvents.cs Log Message: refactored classes that manage isolated storage and implemented solution update command Index: SolutionEvents.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/SharpCvsAddIn/Events/SolutionEvents.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SolutionEvents.cs 26 Feb 2005 23:50:57 -0000 1.3 --- SolutionEvents.cs 6 Mar 2005 01:40:04 -0000 1.4 *************** *** 75,78 **** --- 75,79 ---- { controller_.SolutionCleanup(); + log_.Debug("AfterClosing event"); *************** *** 82,85 **** --- 83,87 ---- { log_.Debug("BeforeClosing event"); + controller_.SolutionClosing(); } *************** *** 88,100 **** { log_.Debug( "Solution opened event triggered" ); // in cvs controlled solution we need to check to see if user // wants add in to manage solution so we pop up a dialog box // to allow user to choose. If the solution was opened directly from cvs // this step is not needed - string solutionPath = Path.GetDirectoryName(controller_.DTE.Solution.FileName); - string cvsPath = Path.Combine( solutionPath, "CVS" ); - FileAttributes attr = File.GetAttributes( cvsPath ); ! if( (int)attr != -1 ) // check for existance { if( !controller_.AddinLoadedForSolution ) --- 90,100 ---- { log_.Debug( "Solution opened event triggered" ); + controller_.SolutionOpened(); // in cvs controlled solution we need to check to see if user // wants add in to manage solution so we pop up a dialog box // to allow user to choose. If the solution was opened directly from cvs // this step is not needed ! if( controller_.SolutionInCVS ) { if( !controller_.AddinLoadedForSolution ) *************** *** 108,111 **** --- 108,112 ---- return; } + } |
From: John M. <mur...@us...> - 2005-03-06 01:40:46
|
Update of /cvsroot/sharpcvslib/sharpcvslib/src/SharpCvsAddIn/Commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1947/Commands Modified Files: OpenSolutionFromCVS.cs SetCvsRepositoryCmd.cs UpdateCommand.cs Log Message: refactored classes that manage isolated storage and implemented solution update command Index: SetCvsRepositoryCmd.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/SharpCvsAddIn/Commands/SetCvsRepositoryCmd.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SetCvsRepositoryCmd.cs 7 Feb 2005 04:54:09 -0000 1.1 --- SetCvsRepositoryCmd.cs 6 Mar 2005 01:40:04 -0000 1.2 *************** *** 6,9 **** --- 6,11 ---- using System.Windows.Forms; using EnvDTE; + using System.Collections; + using SharpCvsAddIn.Persistance; namespace SharpCvsAddIn.Commands *************** *** 27,31 **** override public void Execute( IController cont, string parameters ) { ! FormSetCvsConnection frm = new FormSetCvsConnection( cont, cont.Model.CurrentConnection ); if( frm.ShowDialog(cont.HostWindow) == DialogResult.OK ) --- 29,33 ---- override public void Execute( IController cont, string parameters ) { ! FormSetCvsConnection frm = new FormSetCvsConnection( cont ); if( frm.ShowDialog(cont.HostWindow) == DialogResult.OK ) *************** *** 35,47 **** FormSetCvsConnection.Protocol p = (FormSetCvsConnection.Protocol)frm.protocolList.SelectedItem; ! cont.Model.Roots.CurrentConnection = new ConnectionString(frm.workingDirTextBox.Text, frm.userNameTextBox.Text, frm.cvsHostTxtBox.Text, ! int.Parse( frm.cvsPortTextBox.Text ), p != null ? p.Name : string.Empty, frm.cvsRootTextBox.Text, ! frm.cvsPasswordTxtBox.Text ); cont.Model.Save(); } } --- 37,53 ---- FormSetCvsConnection.Protocol p = (FormSetCvsConnection.Protocol)frm.protocolList.SelectedItem; ! Persistance.Connection conn = new Persistance.Connection( frm.userNameTextBox.Text, frm.cvsHostTxtBox.Text, ! int.Parse(frm.cvsPortTextBox.Text), p != null ? p.Name : string.Empty, frm.cvsRootTextBox.Text, ! frm.cvsPasswordTxtBox.Text, ! frm.workingDirTextBox.Text ); ! ! cont.CurrentConnection = conn; cont.Model.Save(); + } } Index: OpenSolutionFromCVS.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/SharpCvsAddIn/Commands/OpenSolutionFromCVS.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** OpenSolutionFromCVS.cs 28 Feb 2005 00:09:54 -0000 1.2 --- OpenSolutionFromCVS.cs 6 Mar 2005 01:40:03 -0000 1.3 *************** *** 14,17 **** --- 14,20 ---- using SharpCvsAddIn.Jobs; + using SharpCvsAddIn.Persistance; + + using System.Diagnostics; *************** *** 28,32 **** override public vsCommandStatus QueryStatus( IController cont ) { ! return vsCommandStatus.vsCommandStatusSupported | vsCommandStatus.vsCommandStatusEnabled; } --- 31,41 ---- override public vsCommandStatus QueryStatus( IController cont ) { ! if( cont.CurrentConnection != null ) ! { ! return vsCommandStatus.vsCommandStatusSupported | vsCommandStatus.vsCommandStatusEnabled; ! } ! ! return vsCommandStatus.vsCommandStatusSupported; ! } *************** *** 46,102 **** vsPromptResult.vsPromptResultCancelled ) { ! // it's possible not to have assigned a repository yet, if that is the case ! // don't let the user open solution, prompt them instead ! ConnectionString connectionString = cont.Model.CurrentConnection; ! if( connectionString != null ) { ! // get the password if the user hasn't already supplied it ! if( connectionString.Password == string.Empty ) { ! FormGetPassword passwordDlg = new FormGetPassword(cont); ! if( DialogResult.OK == passwordDlg.ShowDialog( cont.HostWindow ) ) ! { ! connectionString.Password = passwordDlg.passwordTextBox.Text; ! } ! else ! { ! // user canceled, bail ! return; ! } } ! ! // got a password and a connection, lets get the module, and find out where ! // the user wants to put the solution ! FormOpenSolutionFromCvs openDlg = new FormOpenSolutionFromCvs( cont, ! connectionString.ToString(), connectionString.WorkingDirectory ); ! if( DialogResult.OK == openDlg.ShowDialog(cont.HostWindow) ) { ! using( new SafeCursor( Cursors.WaitCursor ) ) ! { ! string slnLocation = openDlg.destPathTextBox.Text; ! string moduleName = openDlg.cvsModuleDropDown.Text; ! string tag = openDlg.cvsTagDropDown.Text; ! ! ! CvsCheckoutJob job = new CvsCheckoutJob( cont, ! connectionString.ToString(), ! moduleName, ! slnLocation, ! connectionString.Password, ! openDlg.SolutionPath, ! tag ); ! ! // cvs operation will be handled in job queue thread, the remainder of solution ! // open operation will be done once job is done in OnCheckoutComplete ! cont.Jobs.AddJob( job, new JobCompletionHandler( this.OnCheckoutComplete ) ); ! } ! // everything is successful } } ! else { ! cont.UIShell.ExclamationMessage( "MSGBOX_CVS_ROOT_MISSING" ); ! } } --- 55,97 ---- vsPromptResult.vsPromptResultCancelled ) { ! Debug.Assert( cont.CurrentConnection != null ); ! // get the password if the user hasn't already supplied it ! if( cont.CurrentConnection.Password == string.Empty ) { ! FormGetPassword passwordDlg = new FormGetPassword(cont); ! if( DialogResult.OK == passwordDlg.ShowDialog( cont.HostWindow ) ) { ! cont.CurrentConnection.Password = passwordDlg.passwordTextBox.Text; } ! else { ! // user canceled, bail ! return; } } ! ! // got a password and a connection, lets get the module, and find out where ! // the user wants to put the solution ! FormOpenSolutionFromCvs openDlg = new FormOpenSolutionFromCvs( cont ); ! ! if( DialogResult.OK == openDlg.ShowDialog(cont.HostWindow) ) { ! using( new SafeCursor( Cursors.WaitCursor ) ) ! { ! cont.CurrentConnection.WorkingDirectory = openDlg.WorkingDirectory; ! // update the current connection information with user choices ! cont.CurrentModule = new Persistance.Module( openDlg.cvsModuleDropDown.Text ); ! cont.CurrentTag = openDlg.cvsTagDropDown.Text; ! ! CvsCheckoutJob job = new CvsCheckoutJob( cont ); ! ! // cvs operation will be handled in job queue thread, the remainder of solution ! // open operation will be done once job is done in OnCheckoutComplete ! cont.Jobs.AddJob( job, new JobCompletionHandler( this.OnCheckoutComplete ) ); ! } ! // everything is successful ! } ! } Index: UpdateCommand.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/SharpCvsAddIn/Commands/UpdateCommand.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** UpdateCommand.cs 28 Feb 2005 04:00:56 -0000 1.1 --- UpdateCommand.cs 6 Mar 2005 01:40:04 -0000 1.2 *************** *** 1,25 **** using System; using EnvDTE; namespace SharpCvsAddIn.Commands { ! [VSNetCommandAttribute("CVS_UPDATE_COMMAND", TextResource="CVS_UPDATE_COMMAND", ToolTipResource="CVS_UPDATE_COMMAND_DESC"), ! VSNetControl("Item", Position = 2), ! VSNetControl("Project", Position = 1), ! VSNetControl("Solution", Position = 2), ! VSNetControl("Folder", Position = 2) ] ! public class UpdateCommand : CommandBase { override public vsCommandStatus QueryStatus( IController cont ) { ! return vsCommandStatus.vsCommandStatusSupported | vsCommandStatus.vsCommandStatusEnabled; } override public void Execute( IController cont, string parameters ) { } } } --- 1,133 ---- using System; using EnvDTE; + using log4net; + + using ICSharpCode.SharpCvsLib.Client; + using ICSharpCode.SharpCvsLib.Misc; + using ICSharpCode.SharpCvsLib.Commands; + + using SharpCvsAddIn.Jobs; namespace SharpCvsAddIn.Commands { ! /// <summary> ! /// Menu command that triggers a CVS update on everything in the solution. ! /// </summary> ! [VSNetCommandAttribute("CVS_UPDATE_SOLUTION_COMMAND", TextResource="CVS_UPDATE_COMMAND", ToolTipResource="CVS_UPDATE_COMMAND_DESC"), ! VSNetControl("Solution", Position = 2) ] ! public class UpdateSolutionCommand : CommandBase { + private static readonly ILog log_ = LogManager.GetLogger( typeof(UpdateSolutionCommand)); + override public vsCommandStatus QueryStatus( IController cont ) { ! if( cont.SolutionIsOpen && cont.SolutionInCVS ) ! return vsCommandStatus.vsCommandStatusSupported | vsCommandStatus.vsCommandStatusEnabled; ! else ! return vsCommandStatus.vsCommandStatusSupported; ! } ! ! override public void Execute( IController cont, string parameters ) ! { ! log_.Debug( "Update solution menu command is triggered"); ! ! CvsRoot root = new CvsRoot( cont.CurrentConnection.ConnectionString ); ! WorkingDirectory wd = new WorkingDirectory( root, cont.CurrentConnection.WorkingDirectory, ! cont.CurrentModule.Name ); ! CvsUpdateFolderJob job = new CvsUpdateFolderJob( cont, wd, cont.CurrentConnection.Password ); ! ! cont.Jobs.AddJob( job, new JobCompletionHandler( this.OnUpdateComplete ) ); ! } ! ! private void OnUpdateComplete( object sender, object job ) ! { ! log_.Debug( string.Format("Job {0} is complete", ((IJob)job).Name )); ! } ! ! } ! ! /// <summary> ! /// Menu command that triggers a CVS update on everything in the selected project ! /// </summary> ! [VSNetCommandAttribute("Project.CVS_UPDATE_COMMAND", TextResource="CVS_UPDATE_COMMAND", ToolTipResource="CVS_UPDATE_COMMAND_DESC"), ! VSNetControl("Project", Position = 2) ] ! public class UpdateProjectCommand : CommandBase ! { ! private static readonly ILog log_ = LogManager.GetLogger( typeof(UpdateProjectCommand)); ! ! override public vsCommandStatus QueryStatus( IController cont ) ! { ! if( cont.SolutionIsOpen && cont.SolutionInCVS ) ! return vsCommandStatus.vsCommandStatusSupported | vsCommandStatus.vsCommandStatusEnabled; ! else ! return vsCommandStatus.vsCommandStatusSupported; } override public void Execute( IController cont, string parameters ) { + foreach( EnvDTE.SelectedItem item in cont.DTE.SelectedItems ) + { + // if( typeof(EnvDTE.ProjectItem ).IsInstanceOfType( item. ) + log_.Debug( string.Format( "selected item {0}", item.Name ) ); + } } + } + /// <summary> + /// Menu command that triggers a CVS update on everything in the selecte folder + /// </summary> + [VSNetCommandAttribute("Folder.CVS_UPDATE_COMMAND", TextResource="CVS_UPDATE_COMMAND", ToolTipResource="CVS_UPDATE_COMMAND_DESC"), + VSNetControl("Folder", Position = 2) ] + public class UpdateFolderCommand : CommandBase + { + private static readonly ILog log_ = LogManager.GetLogger( typeof(UpdateFolderCommand)); + + override public vsCommandStatus QueryStatus( IController cont ) + { + if( cont.SolutionIsOpen && cont.SolutionInCVS ) + return vsCommandStatus.vsCommandStatusSupported | vsCommandStatus.vsCommandStatusEnabled; + else + return vsCommandStatus.vsCommandStatusSupported; + } + + override public void Execute( IController cont, string parameters ) + { + foreach( EnvDTE.SelectedItem item in cont.DTE.SelectedItems ) + { + // if( typeof(EnvDTE.ProjectItem ).IsInstanceOfType( item. ) + log_.Debug( string.Format( "selected item {0}", item.Name ) ); + } + } + + } + + + /// <summary> + /// Menu command that triggers a CVS update on selected items in the project + /// </summary> + [VSNetCommandAttribute("Item.CVS_UPDATE_COMMAND", TextResource="CVS_UPDATE_COMMAND", ToolTipResource="CVS_UPDATE_COMMAND_DESC"), + VSNetControl("Item", Position = 2) ] + public class UpdateItemCommand : CommandBase + { + private static readonly ILog log_ = LogManager.GetLogger( typeof(UpdateItemCommand)); + + override public vsCommandStatus QueryStatus( IController cont ) + { + if( cont.SolutionIsOpen && cont.SolutionInCVS ) + return vsCommandStatus.vsCommandStatusSupported | vsCommandStatus.vsCommandStatusEnabled; + else + return vsCommandStatus.vsCommandStatusSupported; + } + + override public void Execute( IController cont, string parameters ) + { + } + + } + + + } |
From: John M. <mur...@us...> - 2005-03-06 01:40:36
|
Update of /cvsroot/sharpcvslib/sharpcvslib/src/SharpCvsAddIn/Persistance In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1947/Persistance Added Files: Connection.cs Module.cs Storage.cs Log Message: refactored classes that manage isolated storage and implemented solution update command --- NEW FILE: Module.cs --- using System; using System.Xml.Serialization; using System.Collections; using System.Diagnostics; namespace SharpCvsAddIn.Persistance { [Serializable] public class Module : IComparable { private string[] tags_ = new string[0]; private string name_ = string.Empty; public Module() { } public Module( string name ) { name_ = name; } public Module( string name, string[] tags ) { tags_ = tags; name_ = name; } public string Name { get{ return name_; } set{ name_ = value; } } public string[] Tags { get{ return tags_; } set{ tags_ = value; } } public bool IsTagPresent( string test ) { foreach( string tag in tags_ ) { if( tag == test ) { return true; } } return false; } public void AddTag( string newTag ) { // don't add duplicates Debug.Assert( !IsTagPresent( newTag ) ); ArrayList list = new ArrayList( this.tags_ ); list.Add( newTag ); list.Sort(); tags_ = new string[ list.Count ]; list.CopyTo( tags_ ); } #region IComparable Members public int CompareTo(object obj) { return this.Name.CompareTo( ((Module)obj).Name ); } #endregion } } --- NEW FILE: Storage.cs --- using System; using System.IO; using System.Xml.Serialization; using System.Diagnostics; using System.Collections; namespace SharpCvsAddIn.Persistance { [Serializable] public class Storage { private Connection[] connections_ = new Connection[0]; private Connection currentConnection_ = null; private Module currentModule_ = null; private string currentTag_ = string.Empty; // TODO - add user settings and other stuff to persist public Storage() { } public Connection[] Connections { get{ return connections_; } set{ connections_ = value; } } public Connection CurrentConnection { get{ return currentConnection_; } set { if( value != null ) { Connection conn = IsConnectionPresent( value ); if( conn != null ) { conn.WorkingDirectory = value.WorkingDirectory; conn.Password = value.Password; currentConnection_ = conn; } else { currentConnection_ = value; AddConnection( value ); } } } } public Module CurrentModule { get{ return currentModule_; } set { Module m = null; if( this.CurrentConnection != null && value != null ) { m = this.CurrentConnection.IsModulePresent( value ); if( m == null ) { m = value; this.CurrentConnection.AddModule( m ); } } currentModule_ = m; } } public string CurrentTag { get{ return currentTag_; } set { if( this.CurrentModule != null ) { if( !this.CurrentModule.IsTagPresent( value ) ) { this.CurrentModule.AddTag( value ); } } currentTag_ = value; } } /// <summary> /// Test to see if connection is already in storage. /// </summary> /// <param name="test">Connection to test.</param> /// <returns>The connection in storage if it exists, else null</returns> private Connection IsConnectionPresent( Connection test ) { foreach( Connection conn in connections_ ) { if( conn.ConnectionString == test.ConnectionString ) { return conn; } } return null; } /// <summary> /// Adds a connection to storage. You should test to see if connection is /// already present before adding it. /// </summary> /// <param name="newConnection"></param> private void AddConnection( Connection newConnection ) { // did you test for duplicates before you added?? Debug.Assert( this.IsConnectionPresent( newConnection ) == null ); ArrayList list = new ArrayList( this.connections_ ); list.Add( newConnection ); list.Sort(); connections_ = new Connection[list.Count]; list.CopyTo(connections_); } } } --- NEW FILE: Connection.cs --- using System; using System.Xml.Serialization; using System.Collections; using System.Text; using log4net; using System.Diagnostics; namespace SharpCvsAddIn.Persistance { [Serializable] public class Connection : IComparable { public const int PORT_UNASSIGNED = 0; public const int PORT_DEFAULT = 2401; private string workingDir_ = string.Empty; private Module[] modules_ = new Module[0]; private string userName_ = string.Empty; private string hostName_ = string.Empty; private int port_ = Connection.PORT_UNASSIGNED; private string protocol_ = string.Empty; private string repository_ = string.Empty; private string password_ = string.Empty; private static readonly ILog log_ = LogManager.GetLogger( typeof(Connection) ); #region methods public Connection() { } public Connection( string userName, string hostName, int port, string protocol, string repository, string password, string workingDir ) { userName_ = userName; hostName_ = hostName; port_ = port; protocol_ = protocol; repository_ = repository; password_ = password; workingDir_ = workingDir; } public override int GetHashCode() { return string.Format("{0}{1}{2}{3}{4}{5}", userName_, hostName_, port_, protocol_, repository_, workingDir_ ).GetHashCode(); } /* public static bool Equals(object o1, object o2 ) { if( o1 != null ) { return o1.Equals( o2 ); } // o1 must be null so test o2 for that return o2 == null; } */ public override bool Equals(object obj) { log_.Debug( string.Format( "Called equals on {0}", this.ConnectionString )); return this.ConnectionString.Equals( ((Connection)obj).ConnectionString ); } public static bool operator ==( Connection c1, Connection c2 ) { return Connection.Equals( c1, c2 ); } public static bool operator != (Connection c1, Connection c2 ) { return !Connection.Equals( c1, c2 ); } [XmlIgnore] public string ConnectionString { //:method:[[user][:password]@]hostname[:[port]][:]/path/to/repository get { StringBuilder sb = new StringBuilder(); if( protocol_ != string.Empty ) { sb.AppendFormat( ":{0}:", protocol_ ); } if( userName_ != string.Empty ) { sb.AppendFormat( "{0}@", userName_ ); } if( hostName_ != string.Empty ) { sb.AppendFormat( "{0}:", hostName_ ); if( port_ > Connection.PORT_UNASSIGNED ) { sb.AppendFormat( "{0}:", port_ ); } } sb.Append( string.Format("/{0}", repository_) ); log_.Debug( string.Format("Connection string = {0}", sb.ToString() ) ); return sb.ToString(); } } #endregion public string Host { get{ return hostName_; } set{ hostName_ = value; } } public string User { get{ return userName_; } set{ userName_ = value; } } public int Port { get{ return port_; } set { port_ = value; } } public string Protocol { get{ return protocol_; } set{ protocol_ = value; } } public string Repository { get{ return repository_; } set{ repository_ = value; } } /// <summary> /// Note that the password is not written to disk where it could be read by any text editor. /// </summary> [XmlIgnore] public string Password { get { return password_; } set { password_ = value; } } public string WorkingDirectory { get { return workingDir_; } set { workingDir_ = value; } } public Module[] Modules { get{ return modules_; } set{ modules_ = value; } } [XmlIgnore] public string[] ModuleNames { get { string[] s = new string[ modules_.Length ]; int i = 0; foreach( Module m in modules_ ) { s[i++] = m.Name; } return s; } } /// <summary> /// Checks if a module is present in list of modules maintained by the connection /// </summary> /// <param name="test">Module to check for existance</param> /// <returns>true if present, else false</returns> internal Module IsModulePresent( Module test ) { foreach( Module m in modules_ ) { if( m.Name == test.Name ) { return m; } } return null; } /// <summary> /// Adds a new module to the list of modules maintained by connection. /// </summary> /// <param name="newModule"></param> internal void AddModule( Module newModule ) { // don't add dups Debug.Assert( this.IsModulePresent( newModule ) == null ); // trim all whitespace from module name to account for the possibility that // the user may have inadvertantly typed spaces in drop down. newModule.Name.Trim(); if( newModule.Name != string.Empty ) { ArrayList list = new ArrayList( modules_ ); list.Add( newModule ); list.Sort(); modules_ = new Module[list.Count]; list.CopyTo( modules_ ); } } #region IComparable Members public int CompareTo(object obj) { return this.ConnectionString.CompareTo( ((Connection)obj).ConnectionString ); } #endregion } } |
From: John M. <mur...@us...> - 2005-03-06 01:40:35
|
Update of /cvsroot/sharpcvslib/sharpcvslib/src/SharpCvsAddIn/Resources/1033 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1947/Resources/1033 Modified Files: app-strings.txt Log Message: refactored classes that manage isolated storage and implemented solution update command Index: app-strings.txt =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/SharpCvsAddIn/Resources/1033/app-strings.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** app-strings.txt 28 Feb 2005 04:00:56 -0000 1.3 --- app-strings.txt 6 Mar 2005 01:40:25 -0000 1.4 *************** *** 65,66 **** --- 65,67 ---- MSGBOX_QUERY_WAITFORCLOSE=The CVS add-in still has some jobs that are not finished. Do you want to keep waiting until they are done? MSGBOX_EXCEPTION_CVS_CHECKOUT=An error occured during CVS checkout. Description = {0} + MSGBOX_MISSING_MODULE=The CVS Module name is missing. |
From: John M. <mur...@us...> - 2005-03-06 01:37:36
|
Update of /cvsroot/sharpcvslib/sharpcvslib/src/SharpCvsAddIn/Persistance In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1367/Persistance Log Message: Directory /cvsroot/sharpcvslib/sharpcvslib/src/SharpCvsAddIn/Persistance added to the repository |