From: Clayton H. <dr...@us...> - 2005-02-06 11:22:10
|
Update of /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode/SharpCvsLib/Misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19930/src/ICSharpCode/SharpCvsLib/Misc Modified Files: CvsRoot.cs Log Message: Fixed a bug in cvsroot. Index: CvsRoot.cs =================================================================== RCS file: /cvsroot/sharpcvslib/sharpcvslib/src/ICSharpCode/SharpCvsLib/Misc/CvsRoot.cs,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** CvsRoot.cs 14 Jan 2005 09:09:44 -0000 1.19 --- CvsRoot.cs 6 Feb 2005 11:21:57 -0000 1.20 *************** *** 53,60 **** /// </summary> public const string CVSROOT_REGEX = ! @":(ext|pserver|ssh|local|sspi) ! :((?:[\w]*@)?[\w]+(?:\.[\w|-]+)*) ! :?((?:[\d]*)?) ! :((?:(?:[A-Za-z]:/)|/).[^\s]*)"; private readonly ILog LOGGER = LogManager.GetLogger(typeof(CvsRoot)); --- 53,61 ---- /// </summary> public const string CVSROOT_REGEX = ! @":(?<Protocol>ext|pserver|ssh|local|sspi) ! :(?<User>[\w\.-]*)[@]* ! (?<Host>[\w\d]+[\.\w\d]*) ! :(?<Port>[\d]+)* ! [:]*(?<Repository>(?:(?:[A-Za-z]:/)|/).[^\s]*)"; private readonly ILog LOGGER = LogManager.GetLogger(typeof(CvsRoot)); *************** *** 131,150 **** } - private string UserHost { - set { - if (value.IndexOf("@") > -1) { - string[] userHost = value.Split('@'); - this.User = userHost[0]; - this.Host = userHost[1]; - } else { - this.Host = value; - } - - if (HasUserVar(this.TransportProtocol)) { - AssertNotEmpty(this.User, "User"); - } - } - } - /// <summary> /// Module to use in command. --- 132,135 ---- *************** *** 280,287 **** cvsRoot)); } ! this.Protocol = matches.Groups[1].Value; ! this.UserHost = matches.Groups[2].Value; ! this.PortString = matches.Groups[3].Value; ! this.CvsRepository = matches.Groups[4].Value; } --- 265,279 ---- cvsRoot)); } ! this.Protocol = matches.Groups["Protocol"].Value; ! if (matches.Groups["User"].Success) { ! this.User = matches.Groups["User"].Value; ! } ! this.Host = matches.Groups["Host"].Value; ! if (matches.Groups["Port"].Success) { ! this.Port = Convert.ToInt32(matches.Groups["Port"].Value); ! } else { ! this.Port = 2401; ! } ! this.CvsRepository = matches.Groups["Repository"].Value; } |