Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
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
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
1
(9) |
2
(12) |
3
|
4
|
5
(31) |
6
(25) |
7
(21) |
8
(7) |
9
(14) |
10
(1) |
11
(18) |
12
(9) |
13
(5) |
14
(1) |
15
(4) |
16
(3) |
17
|
18
|
19
|
20
|
21
|
22
|
23
|
24
|
25
|
26
|
27
|
28
|
29
|
30
|
31
|
|
|
|
From: <skyward@us...> - 2003-12-11 18:42:22
|
Update of /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Console/SharpCvsLib/Console/Commands In directory sc8-pr-cvs1:/tmp/cvs-serv1621/src/ICSharpCode.Console/SharpCvsLib/Console/Commands Modified Files: RTagCommand.cs Log Message: Made Rtag command use the repository instead of fileNames. Index: RTagCommand.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Console/SharpCvsLib/Console/Commands/RTagCommand.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RTagCommand.cs 1 Dec 2003 18:32:26 -0000 1.2 --- RTagCommand.cs 11 Dec 2003 18:42:19 -0000 1.3 *************** *** 49,53 **** private WorkingDirectory currentWorkingDirectory; private CvsRoot cvsRoot; ! private string fileNames; private string localDirectory; private string revision; --- 49,53 ---- private WorkingDirectory currentWorkingDirectory; private CvsRoot cvsRoot; ! private string repository; private string localDirectory; private string revision; *************** *** 67,74 **** /// </summary> /// <param name="cvsroot">User information</param> ! /// <param name="fileNames">Files to remove</param> /// <param name="rtOptions">Options</param> ! public RTagCommand(string cvsroot, string fileNames, string rtOptions) : ! this(new CvsRoot(cvsroot), fileNames, rtOptions) { } --- 67,74 ---- /// </summary> /// <param name="cvsroot">User information</param> ! /// <param name="repository">Repository where to tag the files</param> /// <param name="rtOptions">Options</param> ! public RTagCommand(string cvsroot, string repository, string rtOptions) : ! this(new CvsRoot(cvsroot), repository, rtOptions) { } *************** *** 77,85 **** /// </summary> /// <param name="cvsroot">User Information</param> ! /// <param name="fileNames">Files to remove</param> /// <param name="rtOptions">Options</param> ! public RTagCommand(CvsRoot cvsroot, string fileNames, string rtOptions) { this.cvsRoot = cvsroot; ! this.fileNames = fileNames; this.unparsedOptions = rtOptions; } --- 77,85 ---- /// </summary> /// <param name="cvsroot">User Information</param> ! /// <param name="repository">Repository that contains the files to be tagged</param> /// <param name="rtOptions">Options</param> ! public RTagCommand(CvsRoot cvsroot, string repository, string rtOptions) { this.cvsRoot = cvsroot; ! this.repository = repository; this.unparsedOptions = rtOptions; } *************** *** 101,106 **** } currentWorkingDirectory = new WorkingDirectory( this.cvsRoot, ! localDirectory, fileNames); ! // Create new RemoveCommand object rtagCommand = new ICSharpCode.SharpCvsLib.Commands.RTagCommand( this.currentWorkingDirectory ); --- 101,106 ---- } currentWorkingDirectory = new WorkingDirectory( this.cvsRoot, ! localDirectory, repository); ! // Create new RTagCommand object rtagCommand = new ICSharpCode.SharpCvsLib.Commands.RTagCommand( this.currentWorkingDirectory ); |
From: <skyward@us...> - 2003-12-11 18:29:52
|
Update of /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Console/SharpCvsLib/Console/Commands In directory sc8-pr-cvs1:/tmp/cvs-serv31493/src/ICSharpCode.Console/SharpCvsLib/Console/Commands Modified Files: CommitCommand.cs Log Message: Added -r option to the commit command. Index: CommitCommand.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Console/SharpCvsLib/Console/Commands/CommitCommand.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CommitCommand.cs 11 Dec 2003 04:01:27 -0000 1.2 --- CommitCommand.cs 11 Dec 2003 18:29:49 -0000 1.3 *************** *** 108,111 **** --- 108,114 ---- currentWorkingDirectory = new WorkingDirectory( this.cvsRoot, Environment.CurrentDirectory, repository.FileContents); + if (revision != null) { + this.currentWorkingDirectory.Revision = revision; + } String[] files = Directory.GetFiles(Environment.CurrentDirectory, fileNames); ArrayList copiedFiles = new ArrayList (); |
From: <skyward@us...> - 2003-12-11 17:51:08
|
Update of /cvsroot/sharpcvslib/sharpcvslib In directory sc8-pr-cvs1:/tmp/cvs-serv20318 Modified Files: SharpCvsLib.Tests.csproj Log Message: Added CvsFileNotFoundException.cs to the build. Index: SharpCvsLib.Tests.csproj =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/SharpCvsLib.Tests.csproj,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** SharpCvsLib.Tests.csproj 9 Dec 2003 09:12:16 -0000 1.15 --- SharpCvsLib.Tests.csproj 11 Dec 2003 17:51:05 -0000 1.16 *************** *** 251,254 **** --- 251,259 ---- /> <File + RelPath = "src\ICSharpCode\SharpCvsLib\FileSystem\CvsFileNotFoundException.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "src\ICSharpCode\SharpCvsLib\FileSystem\DuplicateEntryException.cs" SubType = "Code" |
From: <drakmar@us...> - 2003-12-11 16:39:15
|
Update of /cvsroot/sharpcvslib/sharpcvslib In directory sc8-pr-cvs1:/tmp/cvs-serv5536 Modified Files: SharpCvsLib.Tests.prjx SharpCvsLib.csproj SharpCvsLib.prjx Log Message: Fixed bug in checkout causing corruption of Entries file. Also added CvsFileNotFoundException thrown if the CVS management file is not found in the specified path. Index: SharpCvsLib.Tests.prjx =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/SharpCvsLib.Tests.prjx,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** SharpCvsLib.Tests.prjx 7 Dec 2003 22:49:35 -0000 1.28 --- SharpCvsLib.Tests.prjx 11 Dec 2003 16:39:12 -0000 1.29 *************** *** 173,176 **** --- 173,177 ---- <File name=".\src\ICSharpCode\SharpCvsLib\FileSystem\InvalidPathException.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> <File name=".\src\ICSharpCode\SharpCvsLib\FileSystem\AbstractCvsFile.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> + <File name=".\src\ICSharpCode\SharpCvsLib\FileSystem\CvsFileNotFoundException.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> <File name=".\src\ICSharpCode\SharpCvsLib\Requests\IsModifiedRequest.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> <File name=".\src\ICSharpCode\SharpCvsLib\Responses\UnsupportedResponseException.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> Index: SharpCvsLib.csproj =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/SharpCvsLib.csproj,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** SharpCvsLib.csproj 9 Dec 2003 09:12:16 -0000 1.9 --- SharpCvsLib.csproj 11 Dec 2003 16:39:12 -0000 1.10 *************** *** 239,242 **** --- 239,247 ---- /> <File + RelPath = "src\ICSharpCode\SharpCvsLib\FileSystem\CvsFileNotFoundException.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "src\ICSharpCode\SharpCvsLib\FileSystem\DuplicateEntryException.cs" SubType = "Code" Index: SharpCvsLib.prjx =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/SharpCvsLib.prjx,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** SharpCvsLib.prjx 7 Dec 2003 22:49:35 -0000 1.28 --- SharpCvsLib.prjx 11 Dec 2003 16:39:12 -0000 1.29 *************** *** 128,131 **** --- 128,132 ---- <File name=".\src\ICSharpCode\SharpCvsLib\FileSystem\InvalidPathException.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> <File name=".\src\ICSharpCode\SharpCvsLib\FileSystem\AbstractCvsFile.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> + <File name=".\src\ICSharpCode\SharpCvsLib\FileSystem\CvsFileNotFoundException.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> <File name=".\src\ICSharpCode\SharpCvsLib\Requests\IsModifiedRequest.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> <File name=".\src\ICSharpCode\SharpCvsLib\Responses\UnsupportedResponseException.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> |
From: <drakmar@us...> - 2003-12-11 16:36:34
|
Update of /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Tests/SharpCvsLib/Tests In directory sc8-pr-cvs1:/tmp/cvs-serv4974/src/ICSharpCode.Tests/SharpCvsLib/Tests Modified Files: AbstractTest.cs Log Message: Fixed bug in checkout causing corruption of Entries file. Also added CvsFileNotFoundException thrown if the CVS management file is not found in the specified path. Index: AbstractTest.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Tests/SharpCvsLib/Tests/AbstractTest.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** AbstractTest.cs 9 Dec 2003 16:18:31 -0000 1.7 --- AbstractTest.cs 11 Dec 2003 16:36:24 -0000 1.8 *************** *** 89,93 **** [TearDown] public void TearDown() { ! this.CleanTempDirectory(); } --- 89,93 ---- [TearDown] public void TearDown() { ! // this.CleanTempDirectory(); } |
From: <drakmar@us...> - 2003-12-11 16:36:34
|
Update of /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode/SharpCvsLib/FileSystem In directory sc8-pr-cvs1:/tmp/cvs-serv4974/src/ICSharpCode/SharpCvsLib/FileSystem Modified Files: AbstractCvsFile.cs Entries.cs Entry.cs ICvsFile.cs Manager.cs Repository.cs Root.cs Tag.cs Added Files: CvsFileNotFoundException.cs Log Message: Fixed bug in checkout causing corruption of Entries file. Also added CvsFileNotFoundException thrown if the CVS management file is not found in the specified path. --- NEW FILE: CvsFileNotFoundException.cs --- #region Copyright // Copyright (C) 2003 Clayton Harbour // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // // As a special exception, the copyright holders of this library give you // permission to link this library with independent modules to produce an // executable, regardless of the license terms of these independent // modules, and to copy and distribute the resulting executable under // terms of your choice, provided that you also meet, for each linked // independent module, the terms and conditions of the license of that // module. An independent module is a module which is not derived from // or based on this library. If you modify this library, you may extend // this exception to your version of the library, but you are not // obligated to do so. If you do not wish to do so, delete this // exception statement from your version. // // <author>Clayton Harbour</author> #endregion using System; namespace ICSharpCode.SharpCvsLib.FileSystem { /// <summary> /// This in an exception that is thrown if the given CVS\??? management file /// cannot be found inthe given path. The full path to the file being /// searched for should be provided. /// </summary> public class CvsFileNotFoundException : Exception { /// <summary> /// Occurs if the cvs management file cannot be found in the given location /// on the local filesystem. /// </summary> /// <param name="fullPath">The full path to the cvs management file.</param> public CvsFileNotFoundException (String fullPath) : base (fullPath) { } /// <summary> /// Occurs if the cvs management file cannot be found in the given location /// on the local filesystem. /// </summary> /// <param name="fullPath">The full path to the cvs management file.</param> /// <param name="e">An exception that has caused this error, or has /// led to this error.</param> public CvsFileNotFoundException (String fullPath, Exception e) : base (fullPath, e) { } } } Index: AbstractCvsFile.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode/SharpCvsLib/FileSystem/AbstractCvsFile.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AbstractCvsFile.cs 9 Dec 2003 08:25:38 -0000 1.2 --- AbstractCvsFile.cs 11 Dec 2003 16:36:24 -0000 1.3 *************** *** 45,48 **** --- 45,49 ---- private String fullPath; private String fileContents; + private String localCvsFullPath; /// <summary> *************** *** 63,66 **** --- 64,79 ---- } + /// <summary> + /// The full path to the local cvs management file. + /// </summary> + /// <example> + /// <code>/src/sharpcvslib/CVS/Entries</code> + /// <code>c:/src/sharpcvslib/CVS/Entries</code> + /// </example> + public String LocalCvsFileFullPath { + get {return this.localCvsFullPath;} + set {this.localCvsFullPath = value;} + } + private String GetPathWithDirectorySeperatorChar(String path) { if (!path[path.Length - 1].Equals(System.IO.Path.DirectorySeparatorChar)) { *************** *** 111,114 **** --- 124,128 ---- this.Parse(fileContents); + //this.DeriveCvsFullPath(); if (LOGGER.IsDebugEnabled) { *************** *** 126,129 **** --- 140,149 ---- /// <param name="line"></param> public abstract void Parse(String line); + + /// <summary> + /// Derive the cvs filename and path for the storage file. + /// </summary> + /// <returns>The cvs filename and path.</returns> + protected abstract String DeriveCvsFullPath(); } } Index: Entries.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode/SharpCvsLib/FileSystem/Entries.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Entries.cs 5 Dec 2003 05:27:52 -0000 1.2 --- Entries.cs 11 Dec 2003 16:36:24 -0000 1.3 *************** *** 93,96 **** --- 93,103 ---- /// <summary> + /// Return the collection of values for the dictionary. + /// </summary> + public ICollection Values { + get {return this.Dictionary.Values;} + } + + /// <summary> /// Render the entries collection as a human readable string. /// </summary> Index: Entry.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode/SharpCvsLib/FileSystem/Entry.cs,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Entry.cs 9 Dec 2003 08:25:38 -0000 1.16 --- Entry.cs 11 Dec 2003 16:36:24 -0000 1.17 *************** *** 518,521 **** --- 518,531 ---- get {return null == this.Tag;} } + + /// <summary> + /// Returns the full path to the CVS\Entries folder that this entry is + /// managed by. + /// </summary> + /// <returns>The full path to the CVS\Entries folder that this entry + /// is managed by.</returns> + protected override String DeriveCvsFullPath () { + throw new NotImplementedException("This will eventually return the full path to the repository."); + } } } Index: ICvsFile.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode/SharpCvsLib/FileSystem/ICvsFile.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ICvsFile.cs 5 Dec 2003 05:27:52 -0000 1.7 --- ICvsFile.cs 11 Dec 2003 16:36:24 -0000 1.8 *************** *** 54,57 **** --- 54,78 ---- String Filename {get;} + /* + /// <summary> + /// The full path to the cvs management file. In the case of a Root or + /// Repository file this is the path below the directory being managed. + /// In the case of Entries files this can be in the path below if + /// the entry being managed is a file, or in the Entries file above + /// if the file being managed is a directory. + /// </summary> + /// <example> + /// <p>For a Repository file managing the sharpcvslib module folder in + /// the following path: + /// <code>c:/dev/src/sharpcvslib/</code> + /// the Repository file would go in the sub directory or: + /// <code>c:/dev/src/sharpcvslib/CVS/Repository</code> + /// </p> + /// <p>In the case of an Entries file the cvs management folder can + /// appear in one of two places depending on whether the Entry is + /// a directory or a file.</p> + /// </example> + //String CvsFullPath {get;} + */ /// <summary> /// Get the path to the directory above the cvs file. In most cases Index: Manager.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode/SharpCvsLib/FileSystem/Manager.cs,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** Manager.cs 9 Dec 2003 08:25:38 -0000 1.23 --- Manager.cs 11 Dec 2003 16:36:25 -0000 1.24 *************** *** 222,225 **** --- 222,226 ---- (typeof (ICvsFile))); } + /// <summary> /// Add the contents of the cvs file object to the respective file. *************** *** 333,336 **** --- 334,357 ---- /// <summary> + /// Adds a single file or line to the CVS management file on the local + /// file system. + /// </summary> + /// <param name="cvsFile">The collection of cvs entries to add to the + /// file system.</param> + private void WriteToFile (ICvsFile cvsFile) { + ICvsFile[] cvsFiles = {cvsFile}; + this.WriteToFile(cvsFiles); + } + + /// <summary> + /// Write the collection of entries to the file system. + /// </summary> + /// <param name="entries">A collection of entries that needs to be + /// persisted.</param> + private void WriteToFile (Entries entries) { + this.WriteToFile ((ICvsFile[])( + new ArrayList(entries.Values)).ToArray(typeof(ICvsFile))); + } + /// <summary> /// Adds a collection of lines to the cvs file. The first /// entry overwrites any file currently in the directory *************** *** 342,348 **** private void WriteToFile (ICvsFile[] entries) { LOGGER.Debug("entries count=[" + entries.Length + "]"); ! Hashtable testEntries = ! this.ReadFromFile(entries[0].FullPath, entries[0].Filename); ! LOGGER.Debug("test entries count=[" + testEntries.Count + "]"); bool append = false; --- 363,390 ---- private void WriteToFile (ICvsFile[] entries) { LOGGER.Debug("entries count=[" + entries.Length + "]"); ! ! Hashtable testEntries; ! try { ! testEntries = ! this.ReadFromFile(entries[0].FullPath, entries[0].Filename); ! LOGGER.Debug("test entries count=[" + testEntries.Count + "]"); ! } catch (CvsFileNotFoundException e) { ! if (!(entries[0] is Repository) && ! !(entries[0] is Root) && ! !(entries[0] is Entry)) { ! throw e; ! } else if (!File.Exists(entries[0].FullPath) && ! !Directory.Exists(entries[0].FullPath) && ! !Directory.Exists(entries[0].Path)) { ! // paranoid check to make sure the file system somewhat ! // represents the information in the CvsFile :-) ! // check if the files/ directories exist, if not throw ! // an exception. The special entries check is done in case ! // the file exists in the Entries folder and has been deleted ! // from the local file system. ! LOGGER.Debug("entries[0].Path=[" + entries[0].Path + "]"); ! throw e; ! } ! } bool append = false; *************** *** 437,441 **** LOGGER.Debug("path=[" + path + "]"); ! LOGGER.Error("GetCvsDir(String)=[" + cvsDir + "]"); return cvsDir; } --- 479,483 ---- LOGGER.Debug("path=[" + path + "]"); ! LOGGER.Debug("GetCvsDir(String)=[" + cvsDir + "]"); return cvsDir; } *************** *** 509,513 **** msg.Append("path=[").Append(path).Append("]"); msg.Append("fileType=[").Append(fileType).Append("]"); ! throw new FileNotFoundException (msg.ToString ()); } if (entries.Length > 1) { --- 551,555 ---- msg.Append("path=[").Append(path).Append("]"); msg.Append("fileType=[").Append(fileType).Append("]"); ! throw new CvsFileNotFoundException (msg.ToString ()); } if (entries.Length > 1) { *************** *** 612,615 **** --- 654,659 ---- /// <returns>A collection of strings, one for each line /// in the specified file.</returns> + /// <exception cref="CvsFileNotFoundException">If the cvs management + /// file cannot be found in the given path.</exception> private Hashtable ReadFromFile (String fullPath, Factory.FileType fileType) { Hashtable fileContents = new Hashtable (); *************** *** 617,621 **** // String path = fullPath; ! String fileName = factory.GetFilename(fileType); // if ((fullPath.EndsWith(Path.DirectorySeparatorChar.ToString()) || // fullPath.EndsWith("/")) && --- 661,665 ---- // String path = fullPath; ! String cvsFileName = factory.GetFilename(fileType); // if ((fullPath.EndsWith(Path.DirectorySeparatorChar.ToString()) || // fullPath.EndsWith("/")) && *************** *** 627,640 **** // } ! ICvsFile cvsFileTemp = factory.CreateCvsObject(fullPath, fileType, "/EMPTY////"); String cvsPath = this.GetCvsDir(cvsFileTemp); // String cvsPath = Path.Combine(path, CVS); ! String filePath = Path.Combine(cvsPath, fileName); // LOGGER.Debug("filePath=[" + filePath + "]"); ! if (File.Exists(filePath)) { StreamReader sr = null; try { ! sr = File.OpenText(filePath); while (true) { --- 671,699 ---- // } ! // TODO: When I implement the CvsFullPath property on the CvsFiles ! // object remove this hack... ! ICvsFile cvsFileTemp; ! LOGGER.Debug("fullPath=[" + fullPath + "]"); ! if (fileType == Factory.FileType.Entries) { ! if (fullPath.EndsWith(Path.DirectorySeparatorChar.ToString())) { ! cvsFileTemp = ! factory.CreateCvsObject(fullPath, fileType, "D/EMPTY////"); ! } else { ! cvsFileTemp = ! factory.CreateCvsObject(Path.GetDirectoryName(fullPath), fileType, "/EMPTY////"); ! } ! } else { ! cvsFileTemp = ! factory.CreateCvsObject(fullPath, fileType, "/EMPTY////"); ! } String cvsPath = this.GetCvsDir(cvsFileTemp); // String cvsPath = Path.Combine(path, CVS); ! String cvsFullPath = Path.Combine(cvsPath, cvsFileName); // LOGGER.Debug("filePath=[" + filePath + "]"); ! if (File.Exists(cvsFullPath)) { StreamReader sr = null; try { ! sr = File.OpenText(cvsFullPath); while (true) { *************** *** 643,647 **** break; } ! ICvsFile cvsFile = factory.CreateCvsObject(cvsPath, fileName, line); if (!fileContents.Contains(cvsFile.FullPath)) { fileContents.Add(cvsFile.FullPath, cvsFile); --- 702,706 ---- break; } ! ICvsFile cvsFile = factory.CreateCvsObject(cvsPath, cvsFileName, line); if (!fileContents.Contains(cvsFile.FullPath)) { fileContents.Add(cvsFile.FullPath, cvsFile); *************** *** 658,665 **** msg.Append("CVS management file not found."); msg.Append("file type=[").Append(fileType.GetType().FullName).Append("]"); ! msg.Append("fullPath=[").Append(fullPath).Append("]"); ! msg.Append("filePath=[").Append(filePath).Append("]"); LOGGER.Error(e); } finally { if (null != sr) { --- 717,727 ---- msg.Append("CVS management file not found."); msg.Append("file type=[").Append(fileType.GetType().FullName).Append("]"); ! msg.Append("full path=[").Append(fullPath).Append("]"); ! msg.Append("cvsFileName=[").Append(cvsFileName).Append("]"); ! msg.Append("cvsFullPath=[").Append(cvsFullPath).Append("]"); LOGGER.Error(e); + + throw new CvsFileNotFoundException(cvsFullPath, e); } finally { if (null != sr) { *************** *** 675,681 **** msg.Append("CVS management file not found."); msg.Append("file type=[").Append(fileType.GetType().FullName).Append("]"); ! msg.Append("fullPath=[").Append(fullPath).Append("]"); ! msg.Append("filePath=[").Append(filePath).Append("]"); LOGGER.Warn(msg); } return fileContents; --- 737,746 ---- msg.Append("CVS management file not found."); msg.Append("file type=[").Append(fileType.GetType().FullName).Append("]"); ! msg.Append("full path=[").Append(fullPath).Append("]"); ! msg.Append("cvsFileName=[").Append(cvsFileName).Append("]"); ! msg.Append("cvsFullPath=[").Append(cvsFullPath).Append("]"); LOGGER.Warn(msg); + + throw new CvsFileNotFoundException (cvsFullPath); } return fileContents; *************** *** 821,824 **** --- 886,909 ---- /// <summary> + /// Add a repository file if it does not already exist. If the repository + /// file already exists then it is NOT overwritten. + /// </summary> + /// <param name="repository">An object that represents the repository + /// file on the file system.</param> + /// <returns>The repository object.</returns> + public Repository AddRepository (Repository repository) { + try { + // check if the repository exists, if so it does not get modified + return this.FetchRepository(repository.FullPath); + } catch (CvsFileNotFoundException e) { + LOGGER.Debug(e); + // if the repository does not exist then add it + this.WriteToFile(repository); + // TODO: Remove this, just verifying the write operation + return this.FetchRepository(repository.FullPath); + } + } + + /// <summary> /// Create the repository file in the cvs sub directory of the /// current working directory. *************** *** 866,872 **** LOGGER.Debug (msg); } - this.Add (repository); ! return repository; } --- 951,976 ---- LOGGER.Debug (msg); } ! return this.AddRepository (repository); ! } ! ! /// <summary> ! /// Add a root file if it does not already exist. If the root ! /// file already exists then it is NOT overwritten. ! /// </summary> ! /// <param name="root">An object that represents the root ! /// file on the file system.</param> ! /// <returns>The root object.</returns> ! public Root AddRoot (Root root) { ! try { ! // check if the root exists, if so it does not get modified ! return this.FetchRoot(root.FullPath); ! } catch (CvsFileNotFoundException e) { ! LOGGER.Debug(e); ! // if the repository does not exist then add it ! this.WriteToFile(root); ! // TODO: Remove this, just verifying the write operation ! return this.FetchRoot(root.FullPath); ! } } *************** *** 904,910 **** Factory.FileType.Root, pathTranslator.CvsRoot.ToString ()); ! this.Add (root); ! ! return root; } --- 1008,1012 ---- Factory.FileType.Root, pathTranslator.CvsRoot.ToString ()); ! return this.AddRoot (root); } *************** *** 947,955 **** /// <summary> ! /// Create the root file in the local cvs directory. This file holds ! /// the details about the cvs root used in this sandbox. /// </summary> ! /// <param name="workingDirectory">Holds information about the current ! /// path and cvs root.</param> /// <param name="localPath">The local path response sent down from /// the server.</param> --- 1049,1088 ---- /// <summary> ! /// Add the entry to the <code>CVS\Entries</code> file, if the file does ! /// not exist then create a new file. /// </summary> ! /// <param name="entry">An entry object that represents a line in the ! /// <code>CVS\Entries</code> file and/ or a file that is being ! /// managed by CVS.</param> ! /// <returns>The Entry file that has been added.</returns> ! public Entry AddEntry (Entry entry) { ! try { ! LOGGER.Debug("entry.FullPath=[" + entry.FullPath + "]"); ! // check if the entries file exists ! Entries entries = this.FetchEntries(entry.FullPath); ! if (entries.Contains(entry.FullPath)) { ! // update entry ! entries[entry.FullPath] = entry; ! } else { ! // add new entry ! entries.Add(entry.FullPath, entry); ! } ! this.WriteToFile(entries); ! return this.FetchEntry(entry.FullPath); ! } catch (CvsFileNotFoundException e) { ! LOGGER.Debug(e); ! // if the repository does not exist then add it ! this.WriteToFile(entry); ! // TODO: Remove this, just verifying the write operation ! return this.FetchEntry(entry.FullPath); ! } ! } ! ! /// <summary> ! /// Create a <code>CVS\Entries</code> management file with the given ! /// entry line, or if the file exists then add the line to the ! /// management file. ! /// </summary> ! /// <param name="workingDirectory">Local working directory.</param> /// <param name="localPath">The local path response sent down from /// the server.</param> *************** *** 981,999 **** Entry cvsEntry = Entry.CreateEntry(pathTranslator.LocalPathAndFilename); ! // if (pathTranslator.IsDirectory) { ! // cvsEntry = ! // this.CreateDirectoryEntry (pathTranslator.LocalPathAndFilename); ! // } else { ! // (Entry)factory.CreateCvsObject (pathTranslator.LocalPath, ! // Factory.FileType.Entries, ! // entry); ! // } ! ! // make sure the directory is not added outside of the current working ! // directory ! this.ValidateInSandbox(cvsEntry.FullPath); ! this.Add(cvsEntry); ! ! return cvsEntry; } --- 1114,1118 ---- Entry cvsEntry = Entry.CreateEntry(pathTranslator.LocalPathAndFilename); ! return this.AddEntry(cvsEntry); } Index: Repository.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode/SharpCvsLib/FileSystem/Repository.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Repository.cs 5 Dec 2003 05:27:52 -0000 1.8 --- Repository.cs 11 Dec 2003 16:36:25 -0000 1.9 *************** *** 120,123 **** --- 120,133 ---- } + /// <summary> + /// Returns the full path to the CVS\Root folder on the local filesystem + /// that this object represents. + /// </summary> + /// <returns>The full path to the CVS\Root file that this object + /// represents.</returns> + protected override String DeriveCvsFullPath () { + throw new NotImplementedException("This will eventually return the full path to the repository."); + } + } } Index: Root.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode/SharpCvsLib/FileSystem/Root.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Root.cs 9 Dec 2003 08:25:38 -0000 1.8 --- Root.cs 11 Dec 2003 16:36:25 -0000 1.9 *************** *** 116,119 **** --- 116,129 ---- } + /// <summary> + /// Returns the full path to the CVS\Root folder on the local filesystem + /// that this object represents. + /// </summary> + /// <returns>The full path to the CVS\Root file that this object + /// represents.</returns> + protected override String DeriveCvsFullPath () { + throw new NotImplementedException("This will eventually return the full path to the repository."); + } + } } Index: Tag.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode/SharpCvsLib/FileSystem/Tag.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Tag.cs 9 Dec 2003 08:25:38 -0000 1.5 --- Tag.cs 11 Dec 2003 16:36:25 -0000 1.6 *************** *** 121,124 **** --- 121,134 ---- } + /// <summary> + /// Returns the full path to the CVS\Tag file on the local file system + /// that this object represents. + /// </summary> + /// <returns>The full path to the CVS\Tag file that this object + /// represents.</returns> + protected override String DeriveCvsFullPath () { + throw new NotImplementedException("This will eventually return the full path to the repository."); + } + } } |
From: <drakmar@us...> - 2003-12-11 16:36:34
|
Update of /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode/SharpCvsLib/Responses In directory sc8-pr-cvs1:/tmp/cvs-serv4974/src/ICSharpCode/SharpCvsLib/Responses Modified Files: ClearStaticDirectoryResponse.cs UpdatedResponse.cs Log Message: Fixed bug in checkout causing corruption of Entries file. Also added CvsFileNotFoundException thrown if the CVS management file is not found in the specified path. Index: ClearStaticDirectoryResponse.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode/SharpCvsLib/Responses/ClearStaticDirectoryResponse.cs,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** ClearStaticDirectoryResponse.cs 9 Dec 2003 08:25:38 -0000 1.13 --- ClearStaticDirectoryResponse.cs 11 Dec 2003 16:36:25 -0000 1.14 *************** *** 78,82 **** // TODO: There has to be a cleaner way to do this... if (services.Repository.WorkingPath.Length <= entry.Path.Length) { ! manager.Add(entry); } --- 78,82 ---- // TODO: There has to be a cleaner way to do this... if (services.Repository.WorkingPath.Length <= entry.Path.Length) { ! manager.AddEntry(entry); } Index: UpdatedResponse.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode/SharpCvsLib/Responses/UpdatedResponse.cs,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** UpdatedResponse.cs 7 Dec 2003 22:30:31 -0000 1.12 --- UpdatedResponse.cs 11 Dec 2003 16:36:25 -0000 1.13 *************** *** 124,129 **** services.NextFileDate = null; ! manager.Add(e); ! manager.SetFileTimeStamp (localPathAndFilename, e.TimeStamp, e.IsUtcTimeStamp); UpdateMessage message = new UpdateMessage (); --- 124,129 ---- services.NextFileDate = null; ! manager.AddEntry(e); ! manager.SetFileTimeStamp (e.FullPath, e.TimeStamp, e.IsUtcTimeStamp); UpdateMessage message = new UpdateMessage (); |
From: <skyward@us...> - 2003-12-11 05:42:17
|
Update of /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Console/SharpCvsLib/Console/Commands In directory sc8-pr-cvs1:/tmp/cvs-serv20568/src/ICSharpCode.Console/SharpCvsLib/Console/Commands Modified Files: RemoveCommand.cs Log Message: Created currentDirectory variable to make code easier to debug. Index: RemoveCommand.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Console/SharpCvsLib/Console/Commands/RemoveCommand.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RemoveCommand.cs 11 Dec 2003 04:00:43 -0000 1.3 --- RemoveCommand.cs 11 Dec 2003 05:42:14 -0000 1.4 *************** *** 95,109 **** this.ParseOptions(this.unparsedOptions); try { // Open the Repository file in the CVS directory ! Manager manager = new Manager(Environment.CurrentDirectory); ! Repository repository = manager.FetchRepository(Environment.CurrentDirectory); // If this fails error out and state the user // is not in a CVS repository directory tree. currentWorkingDirectory = new WorkingDirectory( this.cvsRoot, ! Environment.CurrentDirectory, repository.FileContents); // Create new RemoveCommand object removeCommand = new ICSharpCode.SharpCvsLib.Commands.RemoveCommand( ! this.currentWorkingDirectory, Environment.CurrentDirectory, ! new ICSharpCode.SharpCvsLib.FileSystem.Entry( Environment.CurrentDirectory, fileNames)); } catch (Exception e) { --- 95,110 ---- this.ParseOptions(this.unparsedOptions); try { + String currentDirectory = Environment.CurrentDirectory; // Open the Repository file in the CVS directory ! Manager manager = new Manager(currentDirectory); ! Repository repository = manager.FetchRepository(currentDirectory); // If this fails error out and state the user // is not in a CVS repository directory tree. currentWorkingDirectory = new WorkingDirectory( this.cvsRoot, ! currentDirectory, repository.FileContents); // Create new RemoveCommand object removeCommand = new ICSharpCode.SharpCvsLib.Commands.RemoveCommand( ! this.currentWorkingDirectory, currentDirectory, ! new ICSharpCode.SharpCvsLib.FileSystem.Entry( currentDirectory, fileNames)); } catch (Exception e) { |
From: <skyward@us...> - 2003-12-11 05:41:09
|
Update of /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Console/SharpCvsLib/Console/Parser In directory sc8-pr-cvs1:/tmp/cvs-serv20441/src/ICSharpCode.Console/SharpCvsLib/Console/Parser Modified Files: CommandLineParser.cs Log Message: Renamed the command that holds the string value to commandTxt so compiler will not be confused with ICommand command object.. Index: CommandLineParser.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Console/SharpCvsLib/Console/Parser/CommandLineParser.cs,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** CommandLineParser.cs 11 Dec 2003 03:56:47 -0000 1.17 --- CommandLineParser.cs 11 Dec 2003 05:41:06 -0000 1.18 *************** *** 60,64 **** private CvsRoot cvsRoot; ! private string command; private string options; private string repository; --- 60,64 ---- private CvsRoot cvsRoot; ! private string commandTxt; private string options; private string repository; *************** *** 89,93 **** /// </summary> public String Command { ! get {return this.command;} } /// <summary> --- 89,93 ---- /// </summary> public String Command { ! get {return this.commandTxt;} } /// <summary> *************** *** 198,202 **** case "new": // no single options for the Add command ! this.command = arguments[i]; i++; // get rest of arguments which is options on the commit command. --- 198,202 ---- case "new": // no single options for the Add command ! this.commandTxt = arguments[i]; i++; // get rest of arguments which is options on the commit command. *************** *** 241,245 **** case "com": singleOptions = "DRcfln"; ! this.command = arguments[i]; i++; // get rest of arguments which is options on the commit command. --- 241,245 ---- case "com": singleOptions = "DRcfln"; ! this.commandTxt = arguments[i]; i++; // get rest of arguments which is options on the commit command. *************** *** 284,288 **** case "get": singleOptions = "ANPRcflnps"; ! this.command = arguments[i]; i++; // get rest of arguments which is options on the checkout command. --- 284,288 ---- case "get": singleOptions = "ANPRcflnps"; ! this.commandTxt = arguments[i]; i++; // get rest of arguments which is options on the checkout command. *************** *** 322,326 **** break; case "init": ! this.command = arguments[i]; try { ICSharpCode.SharpCvsLib.Console.Commands.InitCommand initCommand = --- 322,326 ---- break; case "init": ! this.commandTxt = arguments[i]; try { ICSharpCode.SharpCvsLib.Console.Commands.InitCommand initCommand = *************** *** 337,341 **** case "lgn": // login to server ! this.command = arguments[i]; try { LoginCommand loginCommand = --- 337,341 ---- case "lgn": // login to server ! this.commandTxt = arguments[i]; try { LoginCommand loginCommand = *************** *** 351,355 **** case "password": case "setpass": ! this.command = arguments[i]; break; case "remove": --- 351,355 ---- case "password": case "setpass": ! this.commandTxt = arguments[i]; break; case "remove": *************** *** 357,361 **** case "rm": singleOptions = "Rfl"; ! this.command = arguments[i++]; // get rest of arguments which is options on the update command. while (arguments[i].IndexOf("-", 0, 1) >= 0) { --- 357,362 ---- case "rm": singleOptions = "Rfl"; ! this.commandTxt = arguments[i]; ! i++; // get rest of arguments which is options on the update command. while (arguments[i].IndexOf("-", 0, 1) >= 0) { *************** *** 398,402 **** case "rtfreeze": singleOptions = "abBdfFlMnR"; ! this.command = arguments[i++]; // get rest of arguments which is options on the rtag command. while (arguments[i].IndexOf("-", 0, 1) >= 0) { --- 399,403 ---- case "rtfreeze": singleOptions = "abBdfFlMnR"; ! this.commandTxt = arguments[i++]; // get rest of arguments which is options on the rtag command. while (arguments[i].IndexOf("-", 0, 1) >= 0) { *************** *** 439,443 **** case "update": singleOptions = "ACPRbdfmp"; ! this.command = arguments[i++]; // get rest of arguments which is options on the update command. while (arguments[i].IndexOf("-", 0, 1) >= 0) { --- 440,444 ---- case "update": singleOptions = "ACPRbdfmp"; ! this.commandTxt = arguments[i++]; // get rest of arguments which is options on the update command. while (arguments[i].IndexOf("-", 0, 1) >= 0) { |
From: <skyward@us...> - 2003-12-11 04:57:04
|
Update of /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Console/SharpCvsLib/Console/Commands In directory sc8-pr-cvs1:/tmp/cvs-serv14462/src/ICSharpCode.Console/SharpCvsLib/Console/Commands Modified Files: UpdateCommand.cs Log Message: Corrected the Update command object to update all files in directory not just the one specified. Index: UpdateCommand.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Console/SharpCvsLib/Console/Commands/UpdateCommand.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** UpdateCommand.cs 11 Dec 2003 04:00:03 -0000 1.6 --- UpdateCommand.cs 11 Dec 2003 04:57:01 -0000 1.7 *************** *** 118,122 **** } currentWorkingDirectory.FoldersToUpdate = ! manager.FetchFilesToUpdate (Path.Combine(Environment.CurrentDirectory, fileNames)); // Create new UpdateCommand2 object updateCommand = new UpdateCommand2(currentWorkingDirectory); --- 118,122 ---- } currentWorkingDirectory.FoldersToUpdate = ! manager.FetchFilesToUpdate (Environment.CurrentDirectory); // Create new UpdateCommand2 object updateCommand = new UpdateCommand2(currentWorkingDirectory); |
From: <skyward@us...> - 2003-12-11 04:11:15
|
Update of /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Tests/SharpCvsLib/Console/Commands In directory sc8-pr-cvs1:/tmp/cvs-serv8604/src/ICSharpCode.Tests/SharpCvsLib/Console/Commands Modified Files: AddCommandTest.cs Log Message: Corrected the Add command test object to create new file in the test repository so it can be Added. Index: AddCommandTest.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Tests/SharpCvsLib/Console/Commands/AddCommandTest.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AddCommandTest.cs 11 Dec 2003 04:02:13 -0000 1.2 --- AddCommandTest.cs 11 Dec 2003 04:11:12 -0000 1.3 *************** *** 84,92 **** // Remove the .txt when everything works, giving me bugs... String newFileName = Guid.NewGuid().ToString() + ".txt"; ! fullPath = Path.Combine(Environment.CurrentDirectory, newFileName); File.Copy (file, fullPath); } ! String commandLine = "-d" + settings.Config.Cvsroot + " add " + ! Path.Combine(settings.Config.LocalPath, fullPath); String [] commandLineArgs = commandLine.Split(' '); // Create consoleMain object to test the Add command --- 84,91 ---- // Remove the .txt when everything works, giving me bugs... String newFileName = Guid.NewGuid().ToString() + ".txt"; ! fullPath = Path.Combine(Path.Combine(Environment.CurrentDirectory, settings.Config.Module),newFileName); File.Copy (file, fullPath); } ! String commandLine = "-d" + settings.Config.Cvsroot + " add " + fullPath; String [] commandLineArgs = commandLine.Split(' '); // Create consoleMain object to test the Add command |
From: <skyward@us...> - 2003-12-11 04:03:24
|
Update of /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Tests/SharpCvsLib/Console/Commands In directory sc8-pr-cvs1:/tmp/cvs-serv7526/src/ICSharpCode.Tests/SharpCvsLib/Console/Commands Modified Files: CheckoutCommandTest.cs Log Message: Corrected the Checkout command test object to checkout a file with a valid date specified for the test repository. Index: CheckoutCommandTest.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Tests/SharpCvsLib/Console/Commands/CheckoutCommandTest.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** CheckoutCommandTest.cs 5 Dec 2003 05:27:50 -0000 1.8 --- CheckoutCommandTest.cs 11 Dec 2003 04:03:22 -0000 1.9 *************** *** 118,122 **** [Test] public void MinusDOptionCheckoutByCertainDate (){ ! String commandLine = "-d" + settings.Config.Cvsroot + " co -D 01.28.03 " + settings.Config.Module; String [] commandLineArgs = commandLine.Split(' '); // Test Creating a ConsoleMain object --- 118,122 ---- [Test] public void MinusDOptionCheckoutByCertainDate (){ ! String commandLine = "-d" + settings.Config.Cvsroot + " co -D 09.13.03 " + settings.Config.Module; String [] commandLineArgs = commandLine.Split(' '); // Test Creating a ConsoleMain object |
From: <skyward@us...> - 2003-12-11 04:02:16
|
Update of /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Tests/SharpCvsLib/Console/Commands In directory sc8-pr-cvs1:/tmp/cvs-serv7281/src/ICSharpCode.Tests/SharpCvsLib/Console/Commands Modified Files: AddCommandTest.cs Log Message: Corrected the Add command test object to add file(s) to the current repository. Index: AddCommandTest.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Tests/SharpCvsLib/Console/Commands/AddCommandTest.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AddCommandTest.cs 6 Dec 2003 18:45:23 -0000 1.1 --- AddCommandTest.cs 11 Dec 2003 04:02:13 -0000 1.2 *************** *** 69,72 **** --- 69,73 ---- [Test] public void MakeAddCommandTest () { + String fullPath = null; Directory.CreateDirectory( settings.Config.LocalPath); Environment.CurrentDirectory = settings.Config.LocalPath; *************** *** 75,80 **** // remove file TargetFile // commit remove TargetFile String commandLine = "-d" + settings.Config.Cvsroot + " add " + ! Path.Combine(settings.Config.LocalPath, settings.Config.TargetFile); String [] commandLineArgs = commandLine.Split(' '); // Create consoleMain object to test the Add command --- 76,92 ---- // remove file TargetFile // commit remove TargetFile + String[] files = Directory.GetFiles(Path.Combine(Environment.CurrentDirectory, + settings.Config.Module), "*.txt"); + Assertion.Assert(files.Length > 0); + + foreach (String file in files) { + LOGGER.Debug("file=[" + file + "]"); + // Remove the .txt when everything works, giving me bugs... + String newFileName = Guid.NewGuid().ToString() + ".txt"; + fullPath = Path.Combine(Environment.CurrentDirectory, newFileName); + File.Copy (file, fullPath); + } String commandLine = "-d" + settings.Config.Cvsroot + " add " + ! Path.Combine(settings.Config.LocalPath, fullPath); String [] commandLineArgs = commandLine.Split(' '); // Create consoleMain object to test the Add command *************** *** 83,87 **** consoleMain.Execute(commandLineArgs); ! Assertion.Assert(File.Exists(Path.Combine(settings.Config.LocalPath, settings.Config.TargetFile))); } } --- 95,99 ---- consoleMain.Execute(commandLineArgs); ! Assertion.Assert(File.Exists(fullPath)); } } |
From: <skyward@us...> - 2003-12-11 04:01:30
|
Update of /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Console/SharpCvsLib/Console/Commands In directory sc8-pr-cvs1:/tmp/cvs-serv7146/src/ICSharpCode.Console/SharpCvsLib/Console/Commands Modified Files: CommitCommand.cs Log Message: Corrected the Commit command object to commit file(s) to the current repository. Index: CommitCommand.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Console/SharpCvsLib/Console/Commands/CommitCommand.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CommitCommand.cs 27 Nov 2003 06:05:24 -0000 1.1 --- CommitCommand.cs 11 Dec 2003 04:01:27 -0000 1.2 *************** *** 33,37 **** --- 33,40 ---- using System; using System.Globalization; + using System.Collections; + using System.IO; using System.Text; + using ICSharpCode.SharpCvsLib.FileSystem; using ICSharpCode.SharpCvsLib.Misc; using ICSharpCode.SharpCvsLib.Commands; *************** *** 49,54 **** private WorkingDirectory currentWorkingDirectory; private CvsRoot cvsRoot; ! private string repository; ! private string localDirectory; private string unparsedOptions; private string revision; --- 52,56 ---- private WorkingDirectory currentWorkingDirectory; private CvsRoot cvsRoot; ! private string fileNames; private string unparsedOptions; private string revision; *************** *** 68,75 **** /// </summary> /// <param name="cvsroot">User information</param> ! /// <param name="repository">Files to remove</param> /// <param name="ciOptions">Options</param> ! public CommitCommand(string cvsroot, string repository, string ciOptions) : ! this(new CvsRoot(cvsroot), repository, ciOptions){ } --- 70,77 ---- /// </summary> /// <param name="cvsroot">User information</param> ! /// <param name="fileNames">Files to remove</param> /// <param name="ciOptions">Options</param> ! public CommitCommand(string cvsroot, string fileNames, string ciOptions) : ! this(new CvsRoot(cvsroot), fileNames, ciOptions){ } *************** *** 78,86 **** /// </summary> /// <param name="cvsroot">User Information</param> ! /// <param name="repository">Files to remove</param> /// <param name="ciOptions">Options</param> ! public CommitCommand(CvsRoot cvsroot, string repository, string ciOptions) { this.cvsRoot = cvsroot; ! this.repository = repository; this.unparsedOptions = ciOptions; } --- 80,88 ---- /// </summary> /// <param name="cvsroot">User Information</param> ! /// <param name="fileNames">Files to remove</param> /// <param name="ciOptions">Options</param> ! public CommitCommand(CvsRoot cvsroot, string fileNames, string ciOptions) { this.cvsRoot = cvsroot; ! this.fileNames = fileNames; this.unparsedOptions = ciOptions; } *************** *** 99,107 **** this.ParseOptions(this.unparsedOptions); // set properties before creation of CommitCommand2 ! if (localDirectory == null) { ! localDirectory = Environment.CurrentDirectory; ! } currentWorkingDirectory = new WorkingDirectory( this.cvsRoot, ! localDirectory, repository); // Create new CommitCommand2 object commitCommand = new ICSharpCode.SharpCvsLib.Commands.CommitCommand2( --- 101,119 ---- this.ParseOptions(this.unparsedOptions); // set properties before creation of CommitCommand2 ! // Open the Repository file in the CVS directory ! Manager manager = new Manager(Environment.CurrentDirectory); ! Repository repository = manager.FetchRepository(Environment.CurrentDirectory); ! // If this fails error out and the user ! // is not in a CVS repository directory tree. currentWorkingDirectory = new WorkingDirectory( this.cvsRoot, ! Environment.CurrentDirectory, repository.FileContents); ! String[] files = Directory.GetFiles(Environment.CurrentDirectory, fileNames); ! ArrayList copiedFiles = new ArrayList (); ! foreach (String file in files) { ! LOGGER.Debug("file=[" + file + "]"); ! String fullPath = Path.Combine(Environment.CurrentDirectory, file); ! copiedFiles.Add(fullPath); ! } ! currentWorkingDirectory.Folders = GetFoldersToCommit(copiedFiles); // Create new CommitCommand2 object commitCommand = new ICSharpCode.SharpCvsLib.Commands.CommitCommand2( *************** *** 119,123 **** return commitCommand; } ! /// <summary> /// Parse the command line options/ arguments and populate the command --- 131,172 ---- return commitCommand; } ! /// <summary> ! /// Setup the list of files to be a folder object for the cvs ! /// library to process. ! /// </summary> ! /// <param name="filesCommitted">An array filenames that are to be committed ! /// to the cvs repository.</param> ! private Folders GetFoldersToCommit (ICollection filesCommitted) { ! Folders folders = new Folders(); ! Manager manager = new Manager(Environment.CurrentDirectory); ! LOGGER.Debug("Number of files copied=[" + filesCommitted.Count + "]"); ! foreach (String file in filesCommitted) { ! 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(file); ! folder.Entries.Add (file, entry); ! } ! else { ! folder.Entries[file] = Entry.CreateEntry(file); ! } ! } ! return folders; ! } ! /// <summary> /// Parse the command line options/ arguments and populate the command *************** *** 126,129 **** --- 175,180 ---- /// <param name="ciOptions">A string value that holds the command /// line options the user has selected.</param> + /// <exception cref="NotImplementedException">If the command argument + /// is not implemented currently. TODO: Implement the argument.</exception> private void ParseOptions (String ciOptions) { int endofOptions = 0; |
From: <skyward@us...> - 2003-12-11 04:00:46
|
Update of /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Console/SharpCvsLib/Console/Commands In directory sc8-pr-cvs1:/tmp/cvs-serv6991/src/ICSharpCode.Console/SharpCvsLib/Console/Commands Modified Files: RemoveCommand.cs Log Message: Corrected the Remove command object to remove file(s) at the current repository. Index: RemoveCommand.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Console/SharpCvsLib/Console/Commands/RemoveCommand.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RemoveCommand.cs 2 Dec 2003 18:49:48 -0000 1.2 --- RemoveCommand.cs 11 Dec 2003 04:00:43 -0000 1.3 *************** *** 34,37 **** --- 34,38 ---- using System.Globalization; using System.Text; + using ICSharpCode.SharpCvsLib.FileSystem; using ICSharpCode.SharpCvsLib.Misc; using ICSharpCode.SharpCvsLib.Commands; *************** *** 50,54 **** private CvsRoot cvsRoot; private string fileNames; - private string localDirectory; private string unparsedOptions; private readonly ILog LOGGER = --- 51,54 ---- *************** *** 95,107 **** this.ParseOptions(this.unparsedOptions); try { ! if (localDirectory == null) { ! localDirectory = Environment.CurrentDirectory; ! } currentWorkingDirectory = new WorkingDirectory( this.cvsRoot, ! localDirectory, fileNames); // Create new RemoveCommand object removeCommand = new ICSharpCode.SharpCvsLib.Commands.RemoveCommand( ! this.currentWorkingDirectory, localDirectory, ! new ICSharpCode.SharpCvsLib.FileSystem.Entry( localDirectory, fileNames)); } catch (Exception e) { --- 95,109 ---- this.ParseOptions(this.unparsedOptions); try { ! // Open the Repository file in the CVS directory ! Manager manager = new Manager(Environment.CurrentDirectory); ! Repository repository = manager.FetchRepository(Environment.CurrentDirectory); ! // If this fails error out and state the user ! // is not in a CVS repository directory tree. currentWorkingDirectory = new WorkingDirectory( this.cvsRoot, ! Environment.CurrentDirectory, repository.FileContents); // Create new RemoveCommand object removeCommand = new ICSharpCode.SharpCvsLib.Commands.RemoveCommand( ! this.currentWorkingDirectory, Environment.CurrentDirectory, ! new ICSharpCode.SharpCvsLib.FileSystem.Entry( Environment.CurrentDirectory, fileNames)); } catch (Exception e) { *************** *** 118,122 **** /// <param name="rmOptions">A string value that holds the command /// line options the user has selected.</param> ! private void ParseOptions (String rmOptions) { for (int i = 0; i < rmOptions.Length; i++) { if (rmOptions[i]== '-' && rmOptions[i+1] == 'f') { --- 120,127 ---- /// <param name="rmOptions">A string value that holds the command /// line options the user has selected.</param> ! /// <exception cref="NotImplementedException">If the command argument ! /// is not implemented currently. TODO: Implement the argument.</exception> ! private void ParseOptions (String rmOptions) ! { for (int i = 0; i < rmOptions.Length; i++) { if (rmOptions[i]== '-' && rmOptions[i+1] == 'f') { |
From: <skyward@us...> - 2003-12-11 04:00:06
|
Update of /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Console/SharpCvsLib/Console/Commands In directory sc8-pr-cvs1:/tmp/cvs-serv6737/src/ICSharpCode.Console/SharpCvsLib/Console/Commands Modified Files: UpdateCommand.cs Log Message: Corrected the Update command object to add file(s) at the current repository. Index: UpdateCommand.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Console/SharpCvsLib/Console/Commands/UpdateCommand.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** UpdateCommand.cs 5 Dec 2003 05:27:49 -0000 1.5 --- UpdateCommand.cs 11 Dec 2003 04:00:03 -0000 1.6 *************** *** 51,55 **** private WorkingDirectory currentWorkingDirectory; private CvsRoot cvsRoot; ! private string repository; private string revision; private string localDirectory; --- 51,55 ---- private WorkingDirectory currentWorkingDirectory; private CvsRoot cvsRoot; ! private string fileNames; private string revision; private string localDirectory; *************** *** 69,76 **** /// </summary> /// <param name="cvsroot">User information</param> ! /// <param name="repositoryName">Repository</param> /// <param name="upOptions">Options</param> ! public UpdateCommand(string cvsroot, string repositoryName, string upOptions) : ! this(new CvsRoot(cvsroot), repositoryName, upOptions){ } --- 69,76 ---- /// </summary> /// <param name="cvsroot">User information</param> ! /// <param name="fileNames">Files</param> /// <param name="upOptions">Options</param> ! public UpdateCommand(string cvsroot, string fileNames, string upOptions) : ! this(new CvsRoot(cvsroot), fileNames, upOptions){ } *************** *** 79,87 **** /// </summary> /// <param name="cvsroot">User Information</param> ! /// <param name="repositoryName">Repository</param> /// <param name="upOptions">Options</param> ! public UpdateCommand(CvsRoot cvsroot, string repositoryName, string upOptions) { this.cvsRoot = cvsroot; ! repository = repositoryName; this.unparsedOptions = upOptions; } --- 79,87 ---- /// </summary> /// <param name="cvsroot">User Information</param> ! /// <param name="fileNames">Files</param> /// <param name="upOptions">Options</param> ! public UpdateCommand(CvsRoot cvsroot, string fileNames, string upOptions) { this.cvsRoot = cvsroot; ! this.fileNames = fileNames; this.unparsedOptions = upOptions; } *************** *** 101,109 **** try { if (localDirectory == null) { localDirectory = Environment.CurrentDirectory; } currentWorkingDirectory = new WorkingDirectory( this.cvsRoot, ! localDirectory, repository); if (revision != null) { currentWorkingDirectory.Revision = revision; --- 101,114 ---- try { + // Open the Repository file in the CVS directory + Manager manager = new Manager(Environment.CurrentDirectory); + Repository repository = manager.FetchRepository(Environment.CurrentDirectory); + // If this fails error out and state the user + // is not in a CVS repository directory tree. if (localDirectory == null) { localDirectory = Environment.CurrentDirectory; } currentWorkingDirectory = new WorkingDirectory( this.cvsRoot, ! localDirectory, repository.FileContents); if (revision != null) { currentWorkingDirectory.Revision = revision; *************** *** 112,118 **** currentWorkingDirectory.Date = date; } - Manager manager = new Manager(currentWorkingDirectory.WorkingPath); currentWorkingDirectory.FoldersToUpdate = ! manager.FetchFilesToUpdate (Path.Combine (localDirectory, repository)); // Create new UpdateCommand2 object updateCommand = new UpdateCommand2(currentWorkingDirectory); --- 117,122 ---- currentWorkingDirectory.Date = date; } currentWorkingDirectory.FoldersToUpdate = ! manager.FetchFilesToUpdate (Path.Combine(Environment.CurrentDirectory, fileNames)); // Create new UpdateCommand2 object updateCommand = new UpdateCommand2(currentWorkingDirectory); *************** *** 131,134 **** --- 135,140 ---- /// <param name="upOptions">A string value that holds the command /// line options the user has selected.</param> + /// <exception cref="NotImplementedException">If the command argument + /// is not implemented currently. TODO: Implement the argument.</exception> private void ParseOptions (String upOptions) { int endofOptions = 0; |
From: <skyward@us...> - 2003-12-11 03:59:36
|
Update of /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Console/SharpCvsLib/Console/Commands In directory sc8-pr-cvs1:/tmp/cvs-serv6634/src/ICSharpCode.Console/SharpCvsLib/Console/Commands Modified Files: AddCommand.cs Log Message: Corrected the Add command object to add file(s) at the current repository. Index: AddCommand.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Console/SharpCvsLib/Console/Commands/AddCommand.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AddCommand.cs 6 Dec 2003 18:42:44 -0000 1.1 --- AddCommand.cs 11 Dec 2003 03:59:32 -0000 1.2 *************** *** 33,36 **** --- 33,38 ---- using System; using System.Globalization; + using System.Collections; + using System.IO; using System.Text; using ICSharpCode.SharpCvsLib.Misc; *************** *** 38,41 **** --- 40,44 ---- using ICSharpCode.SharpCvsLib.Client; using ICSharpCode.SharpCvsLib.Console.Parser; + using ICSharpCode.SharpCvsLib.FileSystem; using log4net; *************** *** 50,54 **** private CvsRoot cvsRoot; private string fileNames; - private string localDirectory; private string unparsedOptions; private string message; --- 53,56 ---- *************** *** 97,112 **** this.ParseOptions(this.unparsedOptions); try { ! if (localDirectory == null) { ! localDirectory = Environment.CurrentDirectory; ! } currentWorkingDirectory = new WorkingDirectory( this.cvsRoot, ! localDirectory, fileNames); // If fileNames has a wild card (*) like '*.txt' - ICSharpCode.SharpCvsLib.FileSystem.Entry newEntry = - new ICSharpCode.SharpCvsLib.FileSystem.Entry(fileNames, null); - currentWorkingDirectory.AddEntry(localDirectory, newEntry); // Create new AddCommand object addCommand = new ICSharpCode.SharpCvsLib.Commands.AddCommand( this.currentWorkingDirectory); } catch (Exception e) { --- 99,123 ---- this.ParseOptions(this.unparsedOptions); try { ! // Open the Repository file in the CVS directory ! Manager manager = new Manager(Environment.CurrentDirectory); ! Repository repository = manager.FetchRepository(Environment.CurrentDirectory); ! // If this fails error out and state the user ! // is not in a CVS repository directory tree. currentWorkingDirectory = new WorkingDirectory( this.cvsRoot, ! Environment.CurrentDirectory, repository.FileContents); // If fileNames has a wild card (*) like '*.txt' // Create new AddCommand object addCommand = new ICSharpCode.SharpCvsLib.Commands.AddCommand( this.currentWorkingDirectory); + + String[] files = Directory.GetFiles(Environment.CurrentDirectory, fileNames); + ArrayList copiedFiles = new ArrayList (); + foreach (String file in files) { + LOGGER.Debug("file=[" + file + "]"); + // Remove the .txt when everything works, giving me bugs... + String fullPath = Path.Combine(Environment.CurrentDirectory, file); + copiedFiles.Add(fullPath); + } + addCommand.Folders = GetFoldersToAdd(copiedFiles); } catch (Exception e) { *************** *** 149,152 **** --- 160,198 ---- } } + } + /// <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(file); + folder.Entries.Add (file, entry); + } else { + folder.Entries[file] = Entry.CreateEntry(file); + } + } + return folders; } } |
From: <skyward@us...> - 2003-12-11 03:56:50
|
Update of /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Console/SharpCvsLib/Console/Parser In directory sc8-pr-cvs1:/tmp/cvs-serv6330/src/ICSharpCode.Console/SharpCvsLib/Console/Parser Modified Files: CommandLineParser.cs Log Message: Corrected the Add command parsing to create the Addcommand object instead of the CommitCommand object.. Index: CommandLineParser.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode.Console/SharpCvsLib/Console/Parser/CommandLineParser.cs,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** CommandLineParser.cs 6 Dec 2003 18:43:42 -0000 1.16 --- CommandLineParser.cs 11 Dec 2003 03:56:47 -0000 1.17 *************** *** 42,45 **** --- 42,46 ---- using ICSharpCode.SharpCvsLib.Commands; using ICSharpCode.SharpCvsLib.Misc; + using ICSharpCode.SharpCvsLib.FileSystem; using ICSharpCode.SharpCvsLib.Console.Commands; *************** *** 169,178 **** startIndex = 1; } else { - String tempRoot = Environment.GetEnvironmentVariable (ENV_CVS_ROOT); try { ! this.cvsRoot = new CvsRoot(tempRoot); ! } catch (CvsRootParseException e) { ! LOGGER.Error(e); ! return null; } } --- 170,187 ---- startIndex = 1; } else { try { ! // Get the cvsroot from the Root file in the CVS directory ! Manager manager = new Manager(Environment.CurrentDirectory); ! Root root = manager.FetchRoot(Environment.CurrentDirectory); ! this.cvsRoot = new CvsRoot(root.FileContents); ! } catch { ! // Should be using CVSROOT as last option ! String tempRoot = Environment.GetEnvironmentVariable (ENV_CVS_ROOT); ! try { ! this.cvsRoot = new CvsRoot(tempRoot); ! } catch (CvsRootParseException e) { ! LOGGER.Error(e); ! return null; ! } } } *************** *** 217,222 **** } try { ! CommitCommand addCommand = ! new CommitCommand(this.CvsRoot, repository, options); command = addCommand.CreateCommand (); this.currentWorkingDirectory = --- 226,231 ---- } try { ! ICSharpCode.SharpCvsLib.Console.Commands.AddCommand addCommand = ! new ICSharpCode.SharpCvsLib.Console.Commands.AddCommand(this.CvsRoot, repository, options); command = addCommand.CreateCommand (); this.currentWorkingDirectory = |