/// <see cref="PVCSTask.AddCommandLineArguments"/>
        protected override void AddCommandLineArguments(PVCSCommandArgumentCollection arguments) {
            base.AddCommandLineArguments(arguments);

            foreach (string entityPath in Entities.EntityPaths) {
                arguments.Add(entityPath, null, PVCSCommandArgumentPosition.End);
            }
        }
        /// <see cref="PVCSTask.AddCommandLineArguments"/>
        protected override void AddCommandLineArguments(PVCSCommandArgumentCollection arguments)
        {
            base.AddCommandLineArguments(arguments);

            if (Revision != Double.MaxValue)
            {
                arguments.Add("-r", Revision);
            }

            string commandValue = null;

            switch (UnlockMode)
            {
            case PVCSUnlockMode.AllUsers:
                commandValue = "*";
                break;

            case PVCSUnlockMode.CurrentUser:
                break;

            case PVCSUnlockMode.SpecifiedUser:
                if (User == null)
                {
                    throw new BuildException("Must specify the user when unlockmode is set to SpecifiedUser.");
                }

                commandValue = User;
                break;

            default:
                throw new BuildException("Unknown PVCSUnlockMode: " + UnlockMode);
            }

            arguments.Add("-u", commandValue);
        }
示例#3
0
        /// <see cref="PVCSTask.AddCommandLineArguments"/>
        protected override void AddCommandLineArguments(PVCSCommandArgumentCollection arguments)
        {
            base.AddCommandLineArguments(arguments);

            if (NoBranching)
            {
                arguments.Add("-nb");
            }

            if (NoMultilock)
            {
                arguments.Add("-nm");
            }

            if (PromotionGroup != null)
            {
                arguments.Add("-g", PromotionGroup);
            }

            if (Revision != Double.MaxValue)
            {
                arguments.Add("-r", Revision);
            }

            if (YesToBranching)
            {
                arguments.Add("-yb");
            }

            if (YesToMultilock)
            {
                arguments.Add("-ym");
            }
        }
示例#4
0
        /// <summary>
        /// Constructs the program arguments that should be used when executing the wrapped PVCS process.
        /// </summary>
        /// <returns>A <c>string</c> containing the program arguments.</returns>
        private string GetProgramArguments()
        {
            StringBuilder retVal = new StringBuilder();

            PVCSCommandArgumentCollection arguments = new PVCSCommandArgumentCollection();

            //no banner
            arguments.Add("-nb", null, PVCSCommandArgumentPosition.BeforePCLICommand);
            arguments.Add(PCLICommandName, null, PVCSCommandArgumentPosition.Start);

            //allow subclasses to add their task-specific arguments
            AddCommandLineArguments(arguments);

            PVCSCommandArgument[] argumentsArray = arguments.ToArray();
            Array.Sort(argumentsArray);

            for (int i = 0; i < argumentsArray.Length; ++i)
            {
                Log(Level.Debug, "{0}: {1}", i, argumentsArray[i]);

                if (i != 0)
                {
                    retVal.Append(" ");
                }

                retVal.Append(argumentsArray[i]);
            }

            return(retVal.ToString());
        }
示例#5
0
        /// <see cref="PVCSTask.AddCommandLineArguments"/>
        protected override void AddCommandLineArguments(PVCSCommandArgumentCollection arguments)
        {
            base.AddCommandLineArguments(arguments);

            if (BaseProjectPath != null)
            {
                arguments.Add("-bp", BaseProjectPath);
            }

            if (Location != null)
            {
                arguments.Add("-a", Location);
            }

            if (Lock)
            {
                arguments.Add("-l");
            }

            if (MakeWritable)
            {
                arguments.Add("-w");
            }

            if (!MaxDateTime.Equals(DateTime.MaxValue))
            {
                arguments.Add("-d", MaxDateTime);
            }

            if (OverrideWorkfileLocation)
            {
                arguments.Add("-o");
            }

            if (PromotionGroup != null)
            {
                arguments.Add("-g", PromotionGroup);
            }

            if (Revision != Double.MaxValue)
            {
                arguments.Add("-r", Revision);
            }

            if (Touch)
            {
                arguments.Add("-t");
            }

            if (UpdateOnly)
            {
                arguments.Add("-u");
            }

            if (VersionLabel != null)
            {
                arguments.Add("-v", VersionLabel);
            }
        }
示例#6
0
        /// <see cref="PVCSTask.AddCommandLineArguments"/>
        protected override void AddCommandLineArguments(PVCSCommandArgumentCollection arguments)
        {
            base.AddCommandLineArguments(arguments);

            foreach (string entityPath in Entities.EntityPaths)
            {
                arguments.Add(entityPath, null, PVCSCommandArgumentPosition.End);
            }
        }
示例#7
0
        /// <see cref="PVCSTask.AddCommandLineArguments"/>
        protected override void AddCommandLineArguments(PVCSCommandArgumentCollection arguments)
        {
            base.AddCommandLineArguments(arguments);

            if (WorkfileLocation != null)
            {
                arguments.Add("-w", WorkfileLocation);
            }
        }
示例#8
0
        /// <see cref="PVCSTask.AddCommandLineArguments"/>
        protected override void AddCommandLineArguments(PVCSCommandArgumentCollection arguments)
        {
            base.AddCommandLineArguments(arguments);

            arguments.Add("-t", ArchiveDescription);

            switch (CopyMode)
            {
            case PVCSCopyMode.Default:
                break;

            case PVCSCopyMode.CopyWorkfileIfRequired:
                arguments.Add("-c");
                break;

            case PVCSCopyMode.CopyWorkfileWithOverwrite:
                arguments.Add("-co");
                break;

            default:
                throw new BuildException("Unknown PVCSCopyMode: " + CopyMode);
            }

            if (DeleteWorkfiles)
            {
                arguments.Add("-d");
            }

            if (Description != null)
            {
                arguments.Add("-m", Description);
            }

            if (Lock)
            {
                arguments.Add("-l");
            }

            if (PromotionGroup != null)
            {
                arguments.Add("-g", PromotionGroup);
            }

            if (SuppressAddIfExists)
            {
                arguments.Add("-qw");
            }

            if (VersionLabel != null)
            {
                arguments.Add("-v", VersionLabel);
            }
        }
示例#9
0
        /// <see cref="PVCSTask.AddCommandLineArguments"/>
        protected override void AddCommandLineArguments(PVCSCommandArgumentCollection arguments)
        {
            base.AddCommandLineArguments(arguments);

            if (ExpiryDate != DateTime.MaxValue)
            {
                arguments.Add("-e", ExpiryDate);
            }

            string userPassword = UserName;

            if (Password != null)
            {
                userPassword = userPassword + ":" + Password;
            }

            arguments.Add(userPassword, null, PVCSCommandArgumentPosition.End);
        }
示例#10
0
        /// <see cref="PVCSTask.AddCommandLineArguments"/>
        protected override void AddCommandLineArguments(PVCSCommandArgumentCollection arguments)
        {
            base.AddCommandLineArguments(arguments);

            if (Floating)
            {
                arguments.Add("-f");
            }

            if (Revision != Double.MaxValue)
            {
                arguments.Add("-r", Revision);
            }

            if (VersionLabel != null)
            {
                arguments.Add("-v", VersionLabel);
            }
        }
示例#11
0
        /// <see cref="PVCSTask.AddCommandLineArguments"/>
        protected override void AddCommandLineArguments(PVCSCommandArgumentCollection arguments)
        {
            if (!SupportsIncludeSubprojects && _includeSubProjectsUsed)
            {
                throw new BuildException(string.Format("The {0} task does not support the includesubprojects attribute.", base.Name));
            }

            if (IncludeSubprojects)
            {
                arguments.Add("-z");
            }

            if (ProjectDatabase != null)
            {
                arguments.Add("-pr", ProjectDatabase);
            }

            if (ProjectPath != null)
            {
                arguments.Add("-pp", ProjectPath);
            }

            if (UserId != null)
            {
                string commandValue = null;

                if (Password == null)
                {
                    commandValue = UserId;
                }
                else
                {
                    commandValue = string.Format("{0}:{1}", UserId, Password);
                }

                arguments.Add("-id", commandValue);
            }

            if (Workspace != null)
            {
                arguments.Add("-sp", Workspace);
            }
        }
示例#12
0
        /// <see cref="PVCSTask.AddCommandLineArguments"/>
        protected override void AddCommandLineArguments(PVCSCommandArgumentCollection arguments)
        {
            base.AddCommandLineArguments(arguments);

            object revisionArgument        = null;
            bool   promotionGroupSpecified = (PromotionGroup != null);
            bool   revisionSpecified       = (Revision != Double.MaxValue);
            bool   versionLabelSpecified   = (VersionLabel != null);
            int    count = 0;

            if (promotionGroupSpecified)
            {
                ++count;
                revisionArgument = PromotionGroup;
            }

            if (revisionSpecified)
            {
                ++count;
                revisionArgument = Revision;
            }

            if (versionLabelSpecified)
            {
                ++count;
                revisionArgument = VersionLabel;
            }

            if (count != 1)
            {
                throw new BuildException("Must specify one of promotiongroup, revision or versionlabel for the pvcsassigngroup task.");
            }

            arguments.Add("-g", AssignPromotionGroup);
            arguments.Add("-r", revisionArgument);
        }
示例#13
0
        /// <see cref="PVCSTask.AddCommandLineArguments"/>
        protected override void AddCommandLineArguments(PVCSCommandArgumentCollection arguments) {
            base.AddCommandLineArguments(arguments);

            if (NoBranching) {
                arguments.Add("-nb");
            }

            if (NoMultilock) {
                arguments.Add("-nm");
            }

            if (PromotionGroup != null) {
                arguments.Add("-g", PromotionGroup);
            }

            if (Revision != Double.MaxValue) {
                arguments.Add("-r", Revision);
            }

            if (YesToBranching) {
                arguments.Add("-yb");
            }

            if (YesToMultilock) {
                arguments.Add("-ym");
            }
        }
 /// <see cref="PVCSTask.AddCommandLineArguments"/>
 protected override void AddCommandLineArguments(PVCSCommandArgumentCollection arguments)
 {
     base.AddCommandLineArguments(arguments);
     arguments.Add(AcrossBranches ? "-yb" : "-nb");
     arguments.Add("-g", PromotionGroup);
 }
示例#15
0
 /// <see cref="PVCSTask.AddCommandLineArguments"/>
 protected override void AddCommandLineArguments(PVCSCommandArgumentCollection arguments)
 {
     base.AddCommandLineArguments(arguments);
     arguments.Add("-g", PromotionGroup);
 }
示例#16
0
        /// <see cref="PVCSTask.AddCommandLineArguments"/>
        protected override void AddCommandLineArguments(PVCSCommandArgumentCollection arguments) {
            base.AddCommandLineArguments(arguments);

            if (BaseProjectPath != null) {
                arguments.Add("-bp", BaseProjectPath);
            }

            if (Location != null) {
                arguments.Add("-a", Location);
            }

            if (Lock) {
                arguments.Add("-l");
            }

            if (MakeWritable) {
                arguments.Add("-w");
            }

            if (!MaxDateTime.Equals(DateTime.MaxValue)) {
                arguments.Add("-d", MaxDateTime);
            }

            if (OverrideWorkfileLocation) {
                arguments.Add("-o");
            }

            if (PromotionGroup != null) {
                arguments.Add("-g", PromotionGroup);
            }

            if (Revision != Double.MaxValue) {
                arguments.Add("-r", Revision);
            }

            if (Touch) {
                arguments.Add("-t");
            }

            if (UpdateOnly) {
                arguments.Add("-u");
            }

            if (VersionLabel != null) {
                arguments.Add("-v", VersionLabel);
            }
        }
示例#17
0
        /// <see cref="PVCSTask.AddCommandLineArguments"/>
        protected override void AddCommandLineArguments(PVCSCommandArgumentCollection arguments) {
            base.AddCommandLineArguments(arguments);

            if (BaseProjectPath != null) {
                arguments.Add("-bp", BaseProjectPath);
            }

            if (CheckInUnchanged) {
                arguments.Add("-yf");
            }

            if (Description != null) {
                arguments.Add("-m", Description);
            }

            if (FloatLabel) {
                arguments.Add("-fv");
            }

            if (ForceBranch) {
                arguments.Add("-fb");
            }

            if (IgnoreSpaces) {
                arguments.Add("-b");
            }

            if (KeepWorkfile) {
                arguments.Add("-k");
            }

            if (Location != null) {
                arguments.Add("-a", Location);
            }

            if (Lock) {
                arguments.Add("-l");
            }

            if (OverrideWorkfileLocation) {
                arguments.Add("-o");
            }

            if (PromotionGroup != null) {
                arguments.Add("-g", PromotionGroup);
            }

            if (ReassignLabelIfExists) {
                arguments.Add("-yv");
            }

            if (Revision != Double.MaxValue) {
                arguments.Add("-r", Revision);
            }

            if (UseSameDescription) {
                arguments.Add("-ym");
            }

            if (VersionLabel != null) {
                arguments.Add("-v", VersionLabel);
            }
        }
示例#18
0
 /// <summary>
 /// Allows tasks to add their task-specific arguments to the collection of arguments to be passed to the
 /// PVCS command-line tool.
 /// </summary>
 /// <param name="arguments">The collection of arguments.</param>
 protected abstract void AddCommandLineArguments(PVCSCommandArgumentCollection arguments);
示例#19
0
 /// <see cref="PVCSTask.AddCommandLineArguments"/>
 protected override void AddCommandLineArguments(PVCSCommandArgumentCollection arguments) {
     base.AddCommandLineArguments(arguments);
     arguments.Add("-vf", From);
     arguments.Add("-vt", To);
 }
示例#20
0
 /// <see cref="PVCSTask.AddCommandLineArguments"/>
 protected override void AddCommandLineArguments(PVCSCommandArgumentCollection arguments) {
     base.AddCommandLineArguments(arguments);
     arguments.Add("-g", PromotionGroup);
 }
示例#21
0
        /// <see cref="PVCSTask.AddCommandLineArguments"/>
        protected override void AddCommandLineArguments(PVCSCommandArgumentCollection arguments) {
            base.AddCommandLineArguments(arguments);

            arguments.Add("-t", ArchiveDescription);

            switch (CopyMode) {
                case PVCSCopyMode.Default:
                    break;
                case PVCSCopyMode.CopyWorkfileIfRequired:
                    arguments.Add("-c");
                    break;
                case PVCSCopyMode.CopyWorkfileWithOverwrite:
                    arguments.Add("-co");
                    break;
                default:
                    throw new BuildException("Unknown PVCSCopyMode: " + CopyMode);
            }

            if (DeleteWorkfiles) {
                arguments.Add("-d");
            }

            if (Description != null) {
                arguments.Add("-m", Description);
            }

            if (Lock) {
                arguments.Add("-l");
            }

            if (PromotionGroup != null) {
                arguments.Add("-g", PromotionGroup);
            }

            if (SuppressAddIfExists) {
                arguments.Add("-qw");
            }

            if (VersionLabel != null) {
                arguments.Add("-v", VersionLabel);
            }

        }
示例#22
0
 /// <summary>
 /// Allows tasks to add their task-specific arguments to the collection of arguments to be passed to the
 /// PVCS command-line tool.
 /// </summary>
 /// <param name="arguments">The collection of arguments.</param>
 protected abstract void AddCommandLineArguments(PVCSCommandArgumentCollection arguments);
示例#23
0
        /// <see cref="PVCSTask.AddCommandLineArguments"/>
        protected override void AddCommandLineArguments(PVCSCommandArgumentCollection arguments) {
            base.AddCommandLineArguments(arguments);

            if (ExpiryDate != DateTime.MaxValue) {
                arguments.Add("-e", ExpiryDate);
            }

            string userPassword = UserName;

            if (Password != null) {
                userPassword = userPassword + ":" + Password;
            }

            arguments.Add(userPassword, null, PVCSCommandArgumentPosition.End);
        }
示例#24
0
        /// <summary>
        /// Constructs the program arguments that should be used when executing the wrapped PVCS process.
        /// </summary>
        /// <returns>A <c>string</c> containing the program arguments.</returns>
        private string GetProgramArguments() {
            StringBuilder retVal = new StringBuilder();

            PVCSCommandArgumentCollection arguments = new PVCSCommandArgumentCollection();
            //no banner
            arguments.Add("-nb", null, PVCSCommandArgumentPosition.BeforePCLICommand);
            arguments.Add(PCLICommandName, null, PVCSCommandArgumentPosition.Start);

            //allow subclasses to add their task-specific arguments
            AddCommandLineArguments(arguments);

            PVCSCommandArgument[] argumentsArray = arguments.ToArray();
            Array.Sort(argumentsArray);

            for (int i = 0; i < argumentsArray.Length; ++i) {
                Log(Level.Debug, "{0}: {1}", i, argumentsArray[i]);

                if (i != 0) {
                    retVal.Append(" ");
                }

                retVal.Append(argumentsArray[i]);
            }

            return retVal.ToString();
        }
 /// <see cref="PVCSTask.AddCommandLineArguments"/>
 protected override void AddCommandLineArguments(PVCSCommandArgumentCollection arguments) {
     base.AddCommandLineArguments(arguments);
     arguments.Add(AcrossBranches ? "-yb" : "-nb");
     arguments.Add("-g", PromotionGroup);
 }
        /// <see cref="PVCSTask.AddCommandLineArguments"/>
        protected override void AddCommandLineArguments(PVCSCommandArgumentCollection arguments) {
            if (!SupportsIncludeSubprojects && _includeSubProjectsUsed) {
                throw new BuildException(string.Format("The {0} task does not support the includesubprojects attribute.", base.Name));
            }

            if (IncludeSubprojects) {
                arguments.Add("-z");
            }

            if (ProjectDatabase != null) {
                arguments.Add("-pr", ProjectDatabase);
            }

            if (ProjectPath != null) {
                arguments.Add("-pp", ProjectPath);
            }

            if (UserId != null) {
                string commandValue = null;

                if (Password == null) {
                    commandValue = UserId;
                } else {
                    commandValue = string.Format("{0}:{1}", UserId, Password);
                }

                arguments.Add("-id", commandValue);
            }

            if (Workspace != null) {
                arguments.Add("-sp", Workspace);
            }
        }
 /// <see cref="PVCSTask.AddCommandLineArguments"/>
 protected override void AddCommandLineArguments(PVCSCommandArgumentCollection arguments)
 {
     base.AddCommandLineArguments(arguments);
     arguments.Add("-v", VersionLabel);
 }
示例#28
0
 /// <see cref="PVCSTask.AddCommandLineArguments"/>
 protected override void AddCommandLineArguments(PVCSCommandArgumentCollection arguments)
 {
     base.AddCommandLineArguments(arguments);
     arguments.Add(Entity, null, PVCSCommandArgumentPosition.End);
 }
        /// <see cref="PVCSTask.AddCommandLineArguments"/>
        protected override void AddCommandLineArguments(PVCSCommandArgumentCollection arguments) {
            base.AddCommandLineArguments(arguments);

            if (WorkfileLocation != null) {
                arguments.Add("-w", WorkfileLocation);
            }
        }
 /// <see cref="PVCSTask.AddCommandLineArguments"/>
 protected override void AddCommandLineArguments(PVCSCommandArgumentCollection arguments) {
     base.AddCommandLineArguments(arguments);
     arguments.Add("-gf", From);
     arguments.Add("-gt", To);
 }
示例#31
0
        /// <see cref="PVCSTask.AddCommandLineArguments"/>
        protected override void AddCommandLineArguments(PVCSCommandArgumentCollection arguments)
        {
            base.AddCommandLineArguments(arguments);

            if (BaseProjectPath != null)
            {
                arguments.Add("-bp", BaseProjectPath);
            }

            if (CheckInUnchanged)
            {
                arguments.Add("-yf");
            }

            if (Description != null)
            {
                arguments.Add("-m", Description);
            }

            if (FloatLabel)
            {
                arguments.Add("-fv");
            }

            if (ForceBranch)
            {
                arguments.Add("-fb");
            }

            if (IgnoreSpaces)
            {
                arguments.Add("-b");
            }

            if (KeepWorkfile)
            {
                arguments.Add("-k");
            }

            if (Location != null)
            {
                arguments.Add("-a", Location);
            }

            if (Lock)
            {
                arguments.Add("-l");
            }

            if (OverrideWorkfileLocation)
            {
                arguments.Add("-o");
            }

            if (PromotionGroup != null)
            {
                arguments.Add("-g", PromotionGroup);
            }

            if (ReassignLabelIfExists)
            {
                arguments.Add("-yv");
            }

            if (Revision != Double.MaxValue)
            {
                arguments.Add("-r", Revision);
            }

            if (UseSameDescription)
            {
                arguments.Add("-ym");
            }

            if (VersionLabel != null)
            {
                arguments.Add("-v", VersionLabel);
            }
        }
示例#32
0
        /// <see cref="PVCSTask.AddCommandLineArguments"/>
        protected override void AddCommandLineArguments(PVCSCommandArgumentCollection arguments) {
            base.AddCommandLineArguments(arguments);

            if (Floating) {
                arguments.Add("-f");
            }

            if (Revision != Double.MaxValue) {
                arguments.Add("-r", Revision);
            }

            if (VersionLabel != null) {
                arguments.Add("-v", VersionLabel);
            }
        }
 /// <see cref="PVCSTask.AddCommandLineArguments"/>
 protected override void AddCommandLineArguments(PVCSCommandArgumentCollection arguments) {
     base.AddCommandLineArguments(arguments);
     arguments.Add("-v", VersionLabel);
 }
示例#34
0
        /// <see cref="PVCSTask.AddCommandLineArguments"/>
        protected override void AddCommandLineArguments(PVCSCommandArgumentCollection arguments) {
            base.AddCommandLineArguments(arguments);

            if (Revision != Double.MaxValue) {
                arguments.Add("-r", Revision);
            }

            string commandValue = null;

            switch (UnlockMode) {
                case PVCSUnlockMode.AllUsers:
                    commandValue = "*";
                    break;
                case PVCSUnlockMode.CurrentUser:
                    break;
                case PVCSUnlockMode.SpecifiedUser:
                    if (User == null) {
                        throw new BuildException("Must specify the user when unlockmode is set to SpecifiedUser.");
                    }

                    commandValue = User;
                    break;
                default:
                    throw new BuildException("Unknown PVCSUnlockMode: " + UnlockMode);
            }

            arguments.Add("-u", commandValue);
        }
        /// <see cref="PVCSTask.AddCommandLineArguments"/>
        protected override void AddCommandLineArguments(PVCSCommandArgumentCollection arguments) {
            base.AddCommandLineArguments(arguments);

            object revisionArgument = null;
            bool promotionGroupSpecified = (PromotionGroup != null);
            bool revisionSpecified = (Revision != Double.MaxValue);
            bool versionLabelSpecified = (VersionLabel != null);
            int count = 0;

            if (promotionGroupSpecified) {
                ++count;
                revisionArgument = PromotionGroup;
            }

            if (revisionSpecified) {
                ++count;
                revisionArgument = Revision;
            }

            if (versionLabelSpecified) {
                ++count;
                revisionArgument = VersionLabel;
            }

            if (count != 1) {
                throw new BuildException("Must specify one of promotiongroup, revision or versionlabel for the pvcsassigngroup task.");
            }

            arguments.Add("-g", AssignPromotionGroup);
            arguments.Add("-r", revisionArgument);
        }
 /// <see cref="PVCSTask.AddCommandLineArguments"/>
 protected override void AddCommandLineArguments(PVCSCommandArgumentCollection arguments) {
     base.AddCommandLineArguments(arguments);
     arguments.Add(Entity, null, PVCSCommandArgumentPosition.End);
 }