/// <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); 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); 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); } }
/// <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 (WorkfileLocation != null) { arguments.Add("-w", WorkfileLocation); } }
/// <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); }
/// <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) { 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); 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); 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); }
/// <see cref="PVCSTask.AddCommandLineArguments"/> protected override void AddCommandLineArguments(PVCSCommandArgumentCollection arguments) { base.AddCommandLineArguments(arguments); arguments.Add("-g", PromotionGroup); }
/// <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); } }
/// <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); } }
/// <see cref="PVCSTask.AddCommandLineArguments"/> protected override void AddCommandLineArguments(PVCSCommandArgumentCollection arguments) { base.AddCommandLineArguments(arguments); arguments.Add("-vf", From); arguments.Add("-vt", To); }
/// <see cref="PVCSTask.AddCommandLineArguments"/> protected override void AddCommandLineArguments(PVCSCommandArgumentCollection arguments) { base.AddCommandLineArguments(arguments); arguments.Add(AcrossBranches ? "-yb" : "-nb"); arguments.Add("-g", PromotionGroup); }
/// <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("-v", VersionLabel); }
/// <see cref="PVCSTask.AddCommandLineArguments"/> protected override void AddCommandLineArguments(PVCSCommandArgumentCollection arguments) { base.AddCommandLineArguments(arguments); arguments.Add("-gf", From); arguments.Add("-gt", To); }