Esempio n. 1
0
        /// <summary>
        /// Update the .cvspass file with the given password.  If the passfile
        /// is not specified then the default search locations are used:
        /// <list type="list">
        ///     <item>CVS_PASSFILE/.cvspass</item>
        ///     <item>HOME/.cvspass</item>
        ///     <item>USERPROFILE/.cvspass  TODO: Confirm that this is valid
        ///         behavior or if it is going to give problems with the
        ///         cvsnt implementation.</item>
        /// </list>
        /// </summary>
        protected override void ExecuteTask()
        {
            ICSharpCode.SharpCvsLib.FileSystem.Manager manager =
                new ICSharpCode.SharpCvsLib.FileSystem.Manager(this.DestinationDirectory);

            if (this.PassFile == null)
            {
                manager.UpdatePassFile(this.Password,
                                       new ICSharpCode.SharpCvsLib.Misc.CvsRoot(this.Root));
            }
            else
            {
                Log(Level.Verbose, "Updating .cvspass file '{0}'.", this.PassFile.FullName);
                manager.UpdatePassFile(this.Password,
                                       new ICSharpCode.SharpCvsLib.Misc.CvsRoot(this.Root), this.PassFile);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Update the .cvspass file with the given password.  If the passfile
        /// is not specified then the default search locations are used:
        /// <list type="list">
        ///     <item>CVS_PASSFILE/.cvspass</item>
        ///     <item>HOME/.cvspass</item>
        ///     <item>USERPROFILE/.cvspass  TODO: Confirm that this is valid
        ///         behavior or if it is going to give problems with the
        ///         cvsnt implementation.</item>
        /// </list>
        /// </summary>
        protected override void ExecuteTask () {
            ICSharpCode.SharpCvsLib.FileSystem.Manager manager = 
                new ICSharpCode.SharpCvsLib.FileSystem.Manager(this.DestinationDirectory);

            if (this.PassFile == null) {
                manager.UpdatePassFile(this.Password,
                    new ICSharpCode.SharpCvsLib.Misc.CvsRoot(this.Root));
            } else {
                Log(Level.Verbose, "Updating .cvspass file '{0}'.", this.PassFile.FullName);
                manager.UpdatePassFile(this.Password, 
                    new ICSharpCode.SharpCvsLib.Misc.CvsRoot(this.Root), this.PassFile);
            }
        }