/// <summary> /// Builds the command string for this particular command. /// </summary> /// <returns> /// The command string for this particular command. /// </returns> protected string getSpecificCommandArguments( ) { StringBuilder arguments = new StringBuilder(); arguments.Append("reopen "); if (Changelist != null) { if (Changelist.ToLower() == "default") { arguments.Append("-c default "); } else { arguments.Append(string.Format("-c {0} ", Perforce.GetChangelistNumber( User, Client, Changelist, true))); } } if (Type != null) { arguments.Append(string.Format("-t {0} ", Type)); } arguments.Append(View); return(arguments.ToString()); }
/// <summary> /// Builds the command string for this particular command. /// </summary> /// <returns> /// The command string for this particular command. /// </returns> protected string getSpecificCommandArguments( ) { StringBuilder arguments = new StringBuilder(); arguments.Append("change "); if (Changelist == null) { throw new BuildException("A \"changelist\" is required for p4edit"); } string _changelistnumber = null; if (Delete) { arguments.Append("-d "); _changelistnumber = Perforce.GetChangelistNumber(User, Client, Changelist); } else { _changelistnumber = Perforce.GetChangelistNumber(User, Client, Changelist, true); } arguments.Append(_changelistnumber); return(arguments.ToString()); }
/// <summary> /// Builds the command string for this particular command. /// </summary> /// <returns> /// The command string for this particular command. /// </returns> protected string getSpecificCommandArguments( ) { StringBuilder arguments = new StringBuilder(); arguments.Append("revert "); if (!RevertUnchanged && Changelist == null && View == null) { throw new BuildException(Usage); } if (RevertUnchanged) { arguments.Append("-a "); } if (Changelist != null) { arguments.Append(string.Format("-c {0} ", Perforce.GetChangelistNumber(User, Client, Changelist))); } if (View != null) { arguments.Append(View); } return(arguments.ToString()); }
/// <summary> /// Builds the command string for this particular command. /// </summary> /// <returns> /// The command string for this particular command. /// </returns> protected string getSpecificCommandArguments( ) { StringBuilder arguments = new StringBuilder(); arguments.Append("delete "); if (Changelist != null) { arguments.Append(string.Format("-c {0} ", Perforce.GetChangelistNumber( User, Client, Changelist, true))); } arguments.Append(View); return(arguments.ToString()); }
/// <summary> /// Builds the command string for this particular command. /// </summary> /// <returns> /// The command string for this particular command. /// </returns> protected string getSpecificCommandArguments( ) { StringBuilder arguments = new StringBuilder(); arguments.Append("submit "); string changelistnumber = Perforce.GetChangelistNumber(User, Client, Changelist); if (changelistnumber == null && View == null) { throw new BuildException("If the \"changelist\" does not currently" + " exist, a \"view\" is required.", Location); } if (changelistnumber == null) { changelistnumber = Perforce.GetChangelistNumber(User, Client, Changelist, true); } if (View != null) { // reopen view into changelist Perforce.getProcessOutput("p4", string.Format("-u {0} -c {1} reopen -c {2} {3}", User, Client, changelistnumber, View), null); } if (RevertUnchanged) { // revert Perforce.getProcessOutput("p4", string.Format("-u {0} -c {1} revert -a -c {2}", User, Client, changelistnumber), null); } if (RemainOpen) { arguments.Append("-r "); } arguments.Append(string.Format("-c {0} ", changelistnumber)); return(arguments.ToString()); }
public string GetChangeListNumber(string changelistName) { return(Helper.GetChangelistNumber(Helper.GetUserName(), Helper.GetClient(), changelistName, true)); }