Update of /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode/SharpCvsLib/Misc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8031/src/ICSharpCode/SharpCvsLib/Misc
Modified Files:
CvsRoot.cs
Log Message:
Minor fixes to the CvsRoot parsing and extra unit tests for the fixes.
Index: CvsRoot.cs
===================================================================
RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode/SharpCvsLib/Misc/CvsRoot.cs,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** CvsRoot.cs 5 Sep 2004 19:05:07 -0000 1.13
--- CvsRoot.cs 11 Sep 2004 19:03:36 -0000 1.14
***************
*** 51,58 ****
/// </summary>
public const string CVSROOT_REGEX =
! @":(ext|pserver|ssh|local|sspi)
! :([\w*]*[[@]*[\w*]*[\.\w*]*]*)
! [:]*([\d*]*)
! :([A-Za-z:/|/]+[\w*/-]*)";
private readonly ILog LOGGER = LogManager.GetLogger(typeof(CvsRoot));
--- 51,62 ----
/// </summary>
public const string CVSROOT_REGEX =
! // @":(ext|pserver|ssh|local|sspi)
! //:([\w*]*[[@]*[\w*]*[\.\w*]*]*)
! //[:]*([\d*]*)
! //:([A-Za-z:/|/]+[\w*/-]*)";
! @":(ext|pserver|ssh|local|sspi)
! :((?:[\w]*@)?[\w]+(?:\.[\w]+)*)
! :?((?:[\d]*)?)
! :((?:(?:[A-Za-z]:/)|/).*)";
private readonly ILog LOGGER = LogManager.GetLogger(typeof(CvsRoot));
***************
*** 230,234 ****
LOGGER.Debug(String.Format("Matches count: {0}.", matches.Groups.Count));
! if (matches.Groups.Count <= 0) {
throw new CvsRootParseException(String.Format(@"Bad cvsroot.
Expected ( :protocol:[usename@]server[:port]:[C:]/path/to/repos )
--- 234,238 ----
LOGGER.Debug(String.Format("Matches count: {0}.", matches.Groups.Count));
! if (!matches.Success) {
throw new CvsRootParseException(String.Format(@"Bad cvsroot.
Expected ( :protocol:[usename@]server[:port]:[C:]/path/to/repos )
|