/******************************************************************************* Copyright (c) 2011, Perforce Software, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL PERFORCE SOFTWARE, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *******************************************************************************/ /******************************************************************************* * Name : Repository.Changelist.cs * * Author : dbb * * Description :Changelist operations for the repository object * ******************************************************************************/ using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Perforce.P4 { public partial class Repository { internal Changelist SaveChangelist(Changelist change, Options options) { if (change == null) { throw new ArgumentNullException("change"); } P4Command cmd = null; cmd = new P4Command(this, "change", true); cmd.DataSet = change.ToString(); if (options == null) { options = new Options(); } options["-i"] = null; P4CommandResult results = cmd.Run(options); if (results.Success) { // If this a new change that was saved, we need to parse out the new changelist Id if (change.Id == -1) { string[] words = results.InfoOutput[0].Message.Split(' '); int newId = -1; if (int.TryParse(words[1], out newId)) { Changelist newChange = GetChangelist(newId); return newChange; } } return GetChangelist(change.Id); } else { P4Exception.Throw(results.ErrorList); } return null; } /// /// Create a new empty changelist object using a blank spec returned /// by the server /// /// New changelist /// Guarantees that any custom values are set ///
///
p4 help change ///
///
change -- Create or edit a changelist description ///
changelist -- synonym for 'change' ///
///
p4 change [-s] [-f | -u] [[-O] changelist#] ///
p4 change -d [-f -s -O] changelist# ///
p4 change -o [-s] [-f] [[-O] changelist#] ///
p4 change -i [-s] [-f | -u] ///
p4 change -t restricted | public [-U user] [-f | -u | -O] changelist# ///
p4 change -U user [-t restricted | public] [-f] changelist# ///
///
'p4 change' creates and edits changelists and their descriptions. ///
With no argument, 'p4 change' creates a new changelist. If a ///
changelist number is specified, 'p4 change' edits an existing ///
pending changelist. In both cases, the changelist specification ///
is placed into a form and the user's editor is invoked. ///
///
The -d flag deletes a pending changelist, if it has no opened files ///
and no pending fixes associated with it. Use 'p4 opened -a' to ///
report on opened files and 'p4 reopen' to move them to another ///
changelist. Use 'p4 fixes -c changelist#' to report on pending ///
fixes and 'p4 fix -d -c changelist# jobs...' to delete pending ///
fixes. The changelist can be deleted only by the user and client ///
who created it, or by a user with 'admin' privilege using the -f ///
flag. ///
///
The -o flag writes the changelist specification to the standard ///
output. The user's editor is not invoked. ///
///
The -i flag reads a changelist specification from the standard ///
input. The user's editor is not invoked. ///
///
The -f flag forces the update or deletion of other users' pending ///
changelists. -f can also force the deletion of submitted changelists ///
after they have been emptied of files using 'p4 obliterate'. By ///
default, submitted changelists cannot be changed. The -f flag can ///
also force display of the 'Description' field in a restricted ///
changelist. Finally the -f flag can force changing the 'User' of ///
an empty pending change via -U. The -f flag requires 'admin' ///
access granted by 'p4 protect'. The -f and -u flags are mutually ///
exclusive. ///
///
The -u flag can force the update of a submitted change by the owner ///
of the change. Only the Jobs, Type, and Description fields can be ///
changed using the -u flag. The -f and -u flags cannot be used in ///
the same change command. ///
///
The -s flag extends the list of jobs to include the fix status ///
for each job. On new changelists, the fix status begins as the ///
special status 'ignore', which, if left unchanged simply excludes ///
the job from those being fixed. Otherwise, the fix status, like ///
that applied with 'p4 fix -s', becomes the job's status when ///
the changelist is committed. Note that this option exists ///
to support integration with external defect trackers. ///
///
The -O flag specifies that the changelist number is the original ///
number of a changelist which was renamed on submit. ///
///
The -U flag changes the 'User' of an empty pending change to the ///
specified user. The user field can only be changed using this flag ///
by the user who created the change, or by a user with 'admin' ///
privilege using the -f flag. This option is useful for running ///
in a trigger or script. ///
///
The -t flag changes the 'Type' of the change to 'restricted' ///
or 'public' without displaying the change form. This option is ///
useful for running in a trigger or script. ///
///
The 'Type' field can be used to hide the change or its description ///
from users. Valid values for this field are 'public' (default), and ///
'restricted'. A shelved or committed change that is 'restricted' is ///
accessible only to users who own the change or have 'list' permission ///
to at least one file in the change. A pending (not shelved) change ///
is accessible to its owner. Public changes are accessible to all ///
users. This setting affects the output of the 'p4 change', ///
'p4 changes', and 'p4 describe' commands. ///
///
If a user is not permitted to have access to a restricted change, ///
The 'Description' text is replaced with a 'no permission' message ///
(see 'Type' field). Users with admin permission can override the ///
restriction using the -f flag. ///
///
/// /// /// To create a new empty changelist object: /// /// Changelist c = Repository.NewChangelist(); /// /// public Changelist NewChangelist() { Changelist c = new Changelist(); P4Command cmd = null; cmd = new P4Command(this, "change", true); Options options = new Options(); options["-o"] = null; P4CommandResult results = cmd.Run(options); bool dst_mismatch = false; string offset = string.Empty; if (Server != null && Server.Metadata != null) { offset = Server.Metadata.DateTimeOffset; //dst_mismatch = FormBase.DSTMismatch(Server.Metadata); } if (results.Success) { c.FromChangeCmdTaggedOutput(results.TaggedOutput[0],offset,dst_mismatch); return c; } else { P4Exception.Throw(results.ErrorList); } return null; } /// /// Create a new changelist in the repository. /// /// Changelist specification for the new changelist /// '-s', '-f', -u flags are valid when creating a new changelist /// The Changelist object if new user was created, null if creation failed /// The '-i' flag is added if not specified by the caller ///
///
p4 help change ///
///
change -- Create or edit a changelist description ///
changelist -- synonym for 'change' ///
///
p4 change [-s] [-f | -u] [[-O] changelist#] ///
p4 change -d [-f -s -O] changelist# ///
p4 change -o [-s] [-f] [[-O] changelist#] ///
p4 change -i [-s] [-f | -u] ///
p4 change -t restricted | public [-U user] [-f | -u | -O] changelist# ///
p4 change -U user [-t restricted | public] [-f] changelist# ///
///
'p4 change' creates and edits changelists and their descriptions. ///
With no argument, 'p4 change' creates a new changelist. If a ///
changelist number is specified, 'p4 change' edits an existing ///
pending changelist. In both cases, the changelist specification ///
is placed into a form and the user's editor is invoked. ///
///
The -d flag deletes a pending changelist, if it has no opened files ///
and no pending fixes associated with it. Use 'p4 opened -a' to ///
report on opened files and 'p4 reopen' to move them to another ///
changelist. Use 'p4 fixes -c changelist#' to report on pending ///
fixes and 'p4 fix -d -c changelist# jobs...' to delete pending ///
fixes. The changelist can be deleted only by the user and client ///
who created it, or by a user with 'admin' privilege using the -f ///
flag. ///
///
The -o flag writes the changelist specification to the standard ///
output. The user's editor is not invoked. ///
///
The -i flag reads a changelist specification from the standard ///
input. The user's editor is not invoked. ///
///
The -f flag forces the update or deletion of other users' pending ///
changelists. -f can also force the deletion of submitted changelists ///
after they have been emptied of files using 'p4 obliterate'. By ///
default, submitted changelists cannot be changed. The -f flag can ///
also force display of the 'Description' field in a restricted ///
changelist. Finally the -f flag can force changing the 'User' of ///
an empty pending change via -U. The -f flag requires 'admin' ///
access granted by 'p4 protect'. The -f and -u flags are mutually ///
exclusive. ///
///
The -u flag can force the update of a submitted change by the owner ///
of the change. Only the Jobs, Type, and Description fields can be ///
changed using the -u flag. The -f and -u flags cannot be used in ///
the same change command. ///
///
The -s flag extends the list of jobs to include the fix status ///
for each job. On new changelists, the fix status begins as the ///
special status 'ignore', which, if left unchanged simply excludes ///
the job from those being fixed. Otherwise, the fix status, like ///
that applied with 'p4 fix -s', becomes the job's status when ///
the changelist is committed. Note that this option exists ///
to support integration with external defect trackers. ///
///
The -O flag specifies that the changelist number is the original ///
number of a changelist which was renamed on submit. ///
///
The -U flag changes the 'User' of an empty pending change to the ///
specified user. The user field can only be changed using this flag ///
by the user who created the change, or by a user with 'admin' ///
privilege using the -f flag. This option is useful for running ///
in a trigger or script. ///
///
The -t flag changes the 'Type' of the change to 'restricted' ///
or 'public' without displaying the change form. This option is ///
useful for running in a trigger or script. ///
///
The 'Type' field can be used to hide the change or its description ///
from users. Valid values for this field are 'public' (default), and ///
'restricted'. A shelved or committed change that is 'restricted' is ///
accessible only to users who own the change or have 'list' permission ///
to at least one file in the change. A pending (not shelved) change ///
is accessible to its owner. Public changes are accessible to all ///
users. This setting affects the output of the 'p4 change', ///
'p4 changes', and 'p4 describe' commands. ///
///
If a user is not permitted to have access to a restricted change, ///
The 'Description' text is replaced with a 'no permission' message ///
(see 'Type' field). Users with admin permission can override the ///
restriction using the -f flag. ///
///
///
/// /// To create a new changelist: /// /// Changelist c = new Changelist(); /// c = Repository.CreateChangelist(c, null); /// /// To create a new restricted changelist: /// /// Changelist c = new Changelist(); /// c.Type = ChangeListType.Restricted; /// c = Repository.CreateChangelist(c, null); /// /// /// public Changelist CreateChangelist(Changelist change, Options options) { if (change.Id != -1) { throw new ArgumentOutOfRangeException("change", "Can only create a new changelist"); } return SaveChangelist(change, options); } /// /// Create a new change in the repository. /// /// Changelist specification for the new change /// The Changelist object if new change was created, null if creation failed /// ///
///
p4 help change ///
///
change -- Create or edit a changelist description ///
changelist -- synonym for 'change' ///
///
p4 change [-s] [-f | -u] [[-O] changelist#] ///
p4 change -d [-f -s -O] changelist# ///
p4 change -o [-s] [-f] [[-O] changelist#] ///
p4 change -i [-s] [-f | -u] ///
p4 change -t restricted | public [-U user] [-f | -u | -O] changelist# ///
p4 change -U user [-t restricted | public] [-f] changelist# ///
///
'p4 change' creates and edits changelists and their descriptions. ///
With no argument, 'p4 change' creates a new changelist. If a ///
changelist number is specified, 'p4 change' edits an existing ///
pending changelist. In both cases, the changelist specification ///
is placed into a form and the user's editor is invoked. ///
///
The -d flag deletes a pending changelist, if it has no opened files ///
and no pending fixes associated with it. Use 'p4 opened -a' to ///
report on opened files and 'p4 reopen' to move them to another ///
changelist. Use 'p4 fixes -c changelist#' to report on pending ///
fixes and 'p4 fix -d -c changelist# jobs...' to delete pending ///
fixes. The changelist can be deleted only by the user and client ///
who created it, or by a user with 'admin' privilege using the -f ///
flag. ///
///
The -o flag writes the changelist specification to the standard ///
output. The user's editor is not invoked. ///
///
The -i flag reads a changelist specification from the standard ///
input. The user's editor is not invoked. ///
///
The -f flag forces the update or deletion of other users' pending ///
changelists. -f can also force the deletion of submitted changelists ///
after they have been emptied of files using 'p4 obliterate'. By ///
default, submitted changelists cannot be changed. The -f flag can ///
also force display of the 'Description' field in a restricted ///
changelist. Finally the -f flag can force changing the 'User' of ///
an empty pending change via -U. The -f flag requires 'admin' ///
access granted by 'p4 protect'. The -f and -u flags are mutually ///
exclusive. ///
///
The -u flag can force the update of a submitted change by the owner ///
of the change. Only the Jobs, Type, and Description fields can be ///
changed using the -u flag. The -f and -u flags cannot be used in ///
the same change command. ///
///
The -s flag extends the list of jobs to include the fix status ///
for each job. On new changelists, the fix status begins as the ///
special status 'ignore', which, if left unchanged simply excludes ///
the job from those being fixed. Otherwise, the fix status, like ///
that applied with 'p4 fix -s', becomes the job's status when ///
the changelist is committed. Note that this option exists ///
to support integration with external defect trackers. ///
///
The -O flag specifies that the changelist number is the original ///
number of a changelist which was renamed on submit. ///
///
The -U flag changes the 'User' of an empty pending change to the ///
specified user. The user field can only be changed using this flag ///
by the user who created the change, or by a user with 'admin' ///
privilege using the -f flag. This option is useful for running ///
in a trigger or script. ///
///
The -t flag changes the 'Type' of the change to 'restricted' ///
or 'public' without displaying the change form. This option is ///
useful for running in a trigger or script. ///
///
The 'Type' field can be used to hide the change or its description ///
from users. Valid values for this field are 'public' (default), and ///
'restricted'. A shelved or committed change that is 'restricted' is ///
accessible only to users who own the change or have 'list' permission ///
to at least one file in the change. A pending (not shelved) change ///
is accessible to its owner. Public changes are accessible to all ///
users. This setting affects the output of the 'p4 change', ///
'p4 changes', and 'p4 describe' commands. ///
///
If a user is not permitted to have access to a restricted change, ///
The 'Description' text is replaced with a 'no permission' message ///
(see 'Type' field). Users with admin permission can override the ///
restriction using the -f flag. ///
///
///
/// /// To create a new changelist: /// /// Changelist c = new Changelist(); /// c = Repository.CreateChangelist(c, null); /// /// public Changelist CreateChangelist(Changelist change) { return CreateChangelist(change, null); } /// /// Update the record for a change in the repository /// /// Changelist specification for the change being updated /// The Changelist object if new change was saved, null if creation failed /// ///
///
p4 help change ///
///
change -- Create or edit a changelist description ///
changelist -- synonym for 'change' ///
///
p4 change [-s] [-f | -u] [[-O] changelist#] ///
p4 change -d [-f -s -O] changelist# ///
p4 change -o [-s] [-f] [[-O] changelist#] ///
p4 change -i [-s] [-f | -u] ///
p4 change -t restricted | public [-U user] [-f | -u | -O] changelist# ///
p4 change -U user [-t restricted | public] [-f] changelist# ///
///
'p4 change' creates and edits changelists and their descriptions. ///
With no argument, 'p4 change' creates a new changelist. If a ///
changelist number is specified, 'p4 change' edits an existing ///
pending changelist. In both cases, the changelist specification ///
is placed into a form and the user's editor is invoked. ///
///
The -d flag deletes a pending changelist, if it has no opened files ///
and no pending fixes associated with it. Use 'p4 opened -a' to ///
report on opened files and 'p4 reopen' to move them to another ///
changelist. Use 'p4 fixes -c changelist#' to report on pending ///
fixes and 'p4 fix -d -c changelist# jobs...' to delete pending ///
fixes. The changelist can be deleted only by the user and client ///
who created it, or by a user with 'admin' privilege using the -f ///
flag. ///
///
The -o flag writes the changelist specification to the standard ///
output. The user's editor is not invoked. ///
///
The -i flag reads a changelist specification from the standard ///
input. The user's editor is not invoked. ///
///
The -f flag forces the update or deletion of other users' pending ///
changelists. -f can also force the deletion of submitted changelists ///
after they have been emptied of files using 'p4 obliterate'. By ///
default, submitted changelists cannot be changed. The -f flag can ///
also force display of the 'Description' field in a restricted ///
changelist. Finally the -f flag can force changing the 'User' of ///
an empty pending change via -U. The -f flag requires 'admin' ///
access granted by 'p4 protect'. The -f and -u flags are mutually ///
exclusive. ///
///
The -u flag can force the update of a submitted change by the owner ///
of the change. Only the Jobs, Type, and Description fields can be ///
changed using the -u flag. The -f and -u flags cannot be used in ///
the same change command. ///
///
The -s flag extends the list of jobs to include the fix status ///
for each job. On new changelists, the fix status begins as the ///
special status 'ignore', which, if left unchanged simply excludes ///
the job from those being fixed. Otherwise, the fix status, like ///
that applied with 'p4 fix -s', becomes the job's status when ///
the changelist is committed. Note that this option exists ///
to support integration with external defect trackers. ///
///
The -O flag specifies that the changelist number is the original ///
number of a changelist which was renamed on submit. ///
///
The -U flag changes the 'User' of an empty pending change to the ///
specified user. The user field can only be changed using this flag ///
by the user who created the change, or by a user with 'admin' ///
privilege using the -f flag. This option is useful for running ///
in a trigger or script. ///
///
The -t flag changes the 'Type' of the change to 'restricted' ///
or 'public' without displaying the change form. This option is ///
useful for running in a trigger or script. ///
///
The 'Type' field can be used to hide the change or its description ///
from users. Valid values for this field are 'public' (default), and ///
'restricted'. A shelved or committed change that is 'restricted' is ///
accessible only to users who own the change or have 'list' permission ///
to at least one file in the change. A pending (not shelved) change ///
is accessible to its owner. Public changes are accessible to all ///
users. This setting affects the output of the 'p4 change', ///
'p4 changes', and 'p4 describe' commands. ///
///
If a user is not permitted to have access to a restricted change, ///
The 'Description' text is replaced with a 'no permission' message ///
(see 'Type' field). Users with admin permission can override the ///
restriction using the -f flag. ///
///
///
/// /// To update changelist 15: /// /// Changelist c = Repository.GetChangelist(15); /// /// // change the description /// c.Description = "fixes for localization"; /// c = Repository.UpdateChangelist(c); /// /// public Changelist UpdateChangelist(Changelist change) { if (change.Id <= 0) { throw new ArgumentOutOfRangeException("change", "Can only update a numbered changelist"); } return SaveChangelist(change, null); } /// /// Update the record for a change in the repository /// /// Changelist specification for the change being updated /// The Changelist object if new change was saved, null if creation failed /// ///
///
p4 help change ///
///
change -- Create or edit a changelist description ///
changelist -- synonym for 'change' ///
///
p4 change [-s] [-f | -u] [[-O] changelist#] ///
p4 change -d [-f -s -O] changelist# ///
p4 change -o [-s] [-f] [[-O] changelist#] ///
p4 change -i [-s] [-f | -u] ///
p4 change -t restricted | public [-U user] [-f | -u | -O] changelist# ///
p4 change -U user [-t restricted | public] [-f] changelist# ///
///
'p4 change' creates and edits changelists and their descriptions. ///
With no argument, 'p4 change' creates a new changelist. If a ///
changelist number is specified, 'p4 change' edits an existing ///
pending changelist. In both cases, the changelist specification ///
is placed into a form and the user's editor is invoked. ///
///
The -d flag deletes a pending changelist, if it has no opened files ///
and no pending fixes associated with it. Use 'p4 opened -a' to ///
report on opened files and 'p4 reopen' to move them to another ///
changelist. Use 'p4 fixes -c changelist#' to report on pending ///
fixes and 'p4 fix -d -c changelist# jobs...' to delete pending ///
fixes. The changelist can be deleted only by the user and client ///
who created it, or by a user with 'admin' privilege using the -f ///
flag. ///
///
The -o flag writes the changelist specification to the standard ///
output. The user's editor is not invoked. ///
///
The -i flag reads a changelist specification from the standard ///
input. The user's editor is not invoked. ///
///
The -f flag forces the update or deletion of other users' pending ///
changelists. -f can also force the deletion of submitted changelists ///
after they have been emptied of files using 'p4 obliterate'. By ///
default, submitted changelists cannot be changed. The -f flag can ///
also force display of the 'Description' field in a restricted ///
changelist. Finally the -f flag can force changing the 'User' of ///
an empty pending change via -U. The -f flag requires 'admin' ///
access granted by 'p4 protect'. The -f and -u flags are mutually ///
exclusive. ///
///
The -u flag can force the update of a submitted change by the owner ///
of the change. Only the Jobs, Type, and Description fields can be ///
changed using the -u flag. The -f and -u flags cannot be used in ///
the same change command. ///
///
The -s flag extends the list of jobs to include the fix status ///
for each job. On new changelists, the fix status begins as the ///
special status 'ignore', which, if left unchanged simply excludes ///
the job from those being fixed. Otherwise, the fix status, like ///
that applied with 'p4 fix -s', becomes the job's status when ///
the changelist is committed. Note that this option exists ///
to support integration with external defect trackers. ///
///
The -O flag specifies that the changelist number is the original ///
number of a changelist which was renamed on submit. ///
///
The -U flag changes the 'User' of an empty pending change to the ///
specified user. The user field can only be changed using this flag ///
by the user who created the change, or by a user with 'admin' ///
privilege using the -f flag. This option is useful for running ///
in a trigger or script. ///
///
The -t flag changes the 'Type' of the change to 'restricted' ///
or 'public' without displaying the change form. This option is ///
useful for running in a trigger or script. ///
///
The 'Type' field can be used to hide the change or its description ///
from users. Valid values for this field are 'public' (default), and ///
'restricted'. A shelved or committed change that is 'restricted' is ///
accessible only to users who own the change or have 'list' permission ///
to at least one file in the change. A pending (not shelved) change ///
is accessible to its owner. Public changes are accessible to all ///
users. This setting affects the output of the 'p4 change', ///
'p4 changes', and 'p4 describe' commands. ///
///
If a user is not permitted to have access to a restricted change, ///
The 'Description' text is replaced with a 'no permission' message ///
(see 'Type' field). Users with admin permission can override the ///
restriction using the -f flag. ///
///
///
/// /// To update changelist 15: /// /// Changelist c = Repository.GetChangelist(15); /// /// // change the description /// c.Description = "fixes for localization"; /// c = Repository.UpdateChangelist(c); /// /// To update changelist 15 as an admin user, changing type to Public: /// /// Changelist c = Repository.GetChangelist(15); /// /// ChangeCmdOptions opts = /// new ChangeCmdOptions(ChangeCmdFlags.Force); /// c.Type = ChangeListType.Public; /// c = Repository.UpdateChangelist(c, opts); /// /// /// public Changelist UpdateChangelist(Changelist change, Options options) { if (change.Id <= 0) { throw new ArgumentOutOfRangeException("change", "Can only update a numbered changelist"); } return SaveChangelist(change, options); } /// /// Update the record for a submitted change in the repository /// /// Changelist specification for the change being updated /// options for updating an existing change /// The Changelist object if new change was saved, null if creation failed /// /// Update the record for a change in the repository /// /// Changelist specification for the change being updated /// The Changelist object if new change was saved, null if creation failed /// ///
///
p4 help change ///
///
change -- Create or edit a changelist description ///
changelist -- synonym for 'change' ///
///
p4 change [-s] [-f | -u] [[-O] changelist#] ///
p4 change -d [-f -s -O] changelist# ///
p4 change -o [-s] [-f] [[-O] changelist#] ///
p4 change -i [-s] [-f | -u] ///
p4 change -t restricted | public [-U user] [-f | -u | -O] changelist# ///
p4 change -U user [-t restricted | public] [-f] changelist# ///
///
'p4 change' creates and edits changelists and their descriptions. ///
With no argument, 'p4 change' creates a new changelist. If a ///
changelist number is specified, 'p4 change' edits an existing ///
pending changelist. In both cases, the changelist specification ///
is placed into a form and the user's editor is invoked. ///
///
The -d flag deletes a pending changelist, if it has no opened files ///
and no pending fixes associated with it. Use 'p4 opened -a' to ///
report on opened files and 'p4 reopen' to move them to another ///
changelist. Use 'p4 fixes -c changelist#' to report on pending ///
fixes and 'p4 fix -d -c changelist# jobs...' to delete pending ///
fixes. The changelist can be deleted only by the user and client ///
who created it, or by a user with 'admin' privilege using the -f ///
flag. ///
///
The -o flag writes the changelist specification to the standard ///
output. The user's editor is not invoked. ///
///
The -i flag reads a changelist specification from the standard ///
input. The user's editor is not invoked. ///
///
The -f flag forces the update or deletion of other users' pending ///
changelists. -f can also force the deletion of submitted changelists ///
after they have been emptied of files using 'p4 obliterate'. By ///
default, submitted changelists cannot be changed. The -f flag can ///
also force display of the 'Description' field in a restricted ///
changelist. Finally the -f flag can force changing the 'User' of ///
an empty pending change via -U. The -f flag requires 'admin' ///
access granted by 'p4 protect'. The -f and -u flags are mutually ///
exclusive. ///
///
The -u flag can force the update of a submitted change by the owner ///
of the change. Only the Jobs, Type, and Description fields can be ///
changed using the -u flag. The -f and -u flags cannot be used in ///
the same change command. ///
///
The -s flag extends the list of jobs to include the fix status ///
for each job. On new changelists, the fix status begins as the ///
special status 'ignore', which, if left unchanged simply excludes ///
the job from those being fixed. Otherwise, the fix status, like ///
that applied with 'p4 fix -s', becomes the job's status when ///
the changelist is committed. Note that this option exists ///
to support integration with external defect trackers. ///
///
The -O flag specifies that the changelist number is the original ///
number of a changelist which was renamed on submit. ///
///
The -U flag changes the 'User' of an empty pending change to the ///
specified user. The user field can only be changed using this flag ///
by the user who created the change, or by a user with 'admin' ///
privilege using the -f flag. This option is useful for running ///
in a trigger or script. ///
///
The -t flag changes the 'Type' of the change to 'restricted' ///
or 'public' without displaying the change form. This option is ///
useful for running in a trigger or script. ///
///
The 'Type' field can be used to hide the change or its description ///
from users. Valid values for this field are 'public' (default), and ///
'restricted'. A shelved or committed change that is 'restricted' is ///
accessible only to users who own the change or have 'list' permission ///
to at least one file in the change. A pending (not shelved) change ///
is accessible to its owner. Public changes are accessible to all ///
users. This setting affects the output of the 'p4 change', ///
'p4 changes', and 'p4 describe' commands. ///
///
If a user is not permitted to have access to a restricted change, ///
The 'Description' text is replaced with a 'no permission' message ///
(see 'Type' field). Users with admin permission can override the ///
restriction using the -f flag. ///
///
///
/// /// To update changelist 25: /// /// Changelist c = Repository.GetChangelist(25); /// /// // change the description /// c.Description = "fixes for localization"; /// c = Repository.UpdateSubmittedChangelist(c); /// /// public Changelist UpdateSubmittedChangelist(Changelist change) { return UpdateSubmittedChangelist(change, null); } /// /// Update the record for a submitted change in the repository /// /// Changelist specification for the change being updated /// options for the submitted change being updated /// The Changelist object if new change was saved, null if creation failed /// ///
///
p4 help change ///
///
change -- Create or edit a changelist description ///
changelist -- synonym for 'change' ///
///
p4 change [-s] [-f | -u] [[-O] changelist#] ///
p4 change -d [-f -s -O] changelist# ///
p4 change -o [-s] [-f] [[-O] changelist#] ///
p4 change -i [-s] [-f | -u] ///
p4 change -t restricted | public [-U user] [-f | -u | -O] changelist# ///
p4 change -U user [-t restricted | public] [-f] changelist# ///
///
'p4 change' creates and edits changelists and their descriptions. ///
With no argument, 'p4 change' creates a new changelist. If a ///
changelist number is specified, 'p4 change' edits an existing ///
pending changelist. In both cases, the changelist specification ///
is placed into a form and the user's editor is invoked. ///
///
The -d flag deletes a pending changelist, if it has no opened files ///
and no pending fixes associated with it. Use 'p4 opened -a' to ///
report on opened files and 'p4 reopen' to move them to another ///
changelist. Use 'p4 fixes -c changelist#' to report on pending ///
fixes and 'p4 fix -d -c changelist# jobs...' to delete pending ///
fixes. The changelist can be deleted only by the user and client ///
who created it, or by a user with 'admin' privilege using the -f ///
flag. ///
///
The -o flag writes the changelist specification to the standard ///
output. The user's editor is not invoked. ///
///
The -i flag reads a changelist specification from the standard ///
input. The user's editor is not invoked. ///
///
The -f flag forces the update or deletion of other users' pending ///
changelists. -f can also force the deletion of submitted changelists ///
after they have been emptied of files using 'p4 obliterate'. By ///
default, submitted changelists cannot be changed. The -f flag can ///
also force display of the 'Description' field in a restricted ///
changelist. Finally the -f flag can force changing the 'User' of ///
an empty pending change via -U. The -f flag requires 'admin' ///
access granted by 'p4 protect'. The -f and -u flags are mutually ///
exclusive. ///
///
The -u flag can force the update of a submitted change by the owner ///
of the change. Only the Jobs, Type, and Description fields can be ///
changed using the -u flag. The -f and -u flags cannot be used in ///
the same change command. ///
///
The -s flag extends the list of jobs to include the fix status ///
for each job. On new changelists, the fix status begins as the ///
special status 'ignore', which, if left unchanged simply excludes ///
the job from those being fixed. Otherwise, the fix status, like ///
that applied with 'p4 fix -s', becomes the job's status when ///
the changelist is committed. Note that this option exists ///
to support integration with external defect trackers. ///
///
The -O flag specifies that the changelist number is the original ///
number of a changelist which was renamed on submit. ///
///
The -U flag changes the 'User' of an empty pending change to the ///
specified user. The user field can only be changed using this flag ///
by the user who created the change, or by a user with 'admin' ///
privilege using the -f flag. This option is useful for running ///
in a trigger or script. ///
///
The -t flag changes the 'Type' of the change to 'restricted' ///
or 'public' without displaying the change form. This option is ///
useful for running in a trigger or script. ///
///
The 'Type' field can be used to hide the change or its description ///
from users. Valid values for this field are 'public' (default), and ///
'restricted'. A shelved or committed change that is 'restricted' is ///
accessible only to users who own the change or have 'list' permission ///
to at least one file in the change. A pending (not shelved) change ///
is accessible to its owner. Public changes are accessible to all ///
users. This setting affects the output of the 'p4 change', ///
'p4 changes', and 'p4 describe' commands. ///
///
If a user is not permitted to have access to a restricted change, ///
The 'Description' text is replaced with a 'no permission' message ///
(see 'Type' field). Users with admin permission can override the ///
restriction using the -f flag. ///
///
///
/// /// To update changelist 25: /// /// Changelist c = Repository.GetChangelist(25); /// /// // change the description /// c.Description = "fixes for localization"; /// c = Repository.UpdateChangelist(c); /// /// To update changelist 15 as an admin user, changing type to Public: /// /// Changelist c = Repository.GetChangelist(25); /// /// ChangeCmdOptions opts = /// new ChangeCmdOptions(ChangeCmdFlags.Force); /// c.Type = ChangeListType.Public; /// c = Repository.UpdateChangelist(c, opts); /// /// /// public Changelist UpdateSubmittedChangelist(Changelist change, Options options) { if (change.Id <= 0) { throw new ArgumentOutOfRangeException("change", "Can only update a numbered changelist"); } if (options == null) { options=new Options(); options["-u"] = null; } return SaveChangelist(change, options); } /// /// Get the record for an existing change from the repository. /// /// Changelist name /// '-f' or '-s' are valid flags to use when fetching an existing change /// The Changelist object if new change was found, null if creation failed /// ///
///
p4 help change ///
///
change -- Create or edit a changelist description ///
changelist -- synonym for 'change' ///
///
p4 change [-s] [-f | -u] [[-O] changelist#] ///
p4 change -d [-f -s -O] changelist# ///
p4 change -o [-s] [-f] [[-O] changelist#] ///
p4 change -i [-s] [-f | -u] ///
p4 change -t restricted | public [-U user] [-f | -u | -O] changelist# ///
p4 change -U user [-t restricted | public] [-f] changelist# ///
///
'p4 change' creates and edits changelists and their descriptions. ///
With no argument, 'p4 change' creates a new changelist. If a ///
changelist number is specified, 'p4 change' edits an existing ///
pending changelist. In both cases, the changelist specification ///
is placed into a form and the user's editor is invoked. ///
///
The -d flag deletes a pending changelist, if it has no opened files ///
and no pending fixes associated with it. Use 'p4 opened -a' to ///
report on opened files and 'p4 reopen' to move them to another ///
changelist. Use 'p4 fixes -c changelist#' to report on pending ///
fixes and 'p4 fix -d -c changelist# jobs...' to delete pending ///
fixes. The changelist can be deleted only by the user and client ///
who created it, or by a user with 'admin' privilege using the -f ///
flag. ///
///
The -o flag writes the changelist specification to the standard ///
output. The user's editor is not invoked. ///
///
The -i flag reads a changelist specification from the standard ///
input. The user's editor is not invoked. ///
///
The -f flag forces the update or deletion of other users' pending ///
changelists. -f can also force the deletion of submitted changelists ///
after they have been emptied of files using 'p4 obliterate'. By ///
default, submitted changelists cannot be changed. The -f flag can ///
also force display of the 'Description' field in a restricted ///
changelist. Finally the -f flag can force changing the 'User' of ///
an empty pending change via -U. The -f flag requires 'admin' ///
access granted by 'p4 protect'. The -f and -u flags are mutually ///
exclusive. ///
///
The -u flag can force the update of a submitted change by the owner ///
of the change. Only the Jobs, Type, and Description fields can be ///
changed using the -u flag. The -f and -u flags cannot be used in ///
the same change command. ///
///
The -s flag extends the list of jobs to include the fix status ///
for each job. On new changelists, the fix status begins as the ///
special status 'ignore', which, if left unchanged simply excludes ///
the job from those being fixed. Otherwise, the fix status, like ///
that applied with 'p4 fix -s', becomes the job's status when ///
the changelist is committed. Note that this option exists ///
to support integration with external defect trackers. ///
///
The -O flag specifies that the changelist number is the original ///
number of a changelist which was renamed on submit. ///
///
The -U flag changes the 'User' of an empty pending change to the ///
specified user. The user field can only be changed using this flag ///
by the user who created the change, or by a user with 'admin' ///
privilege using the -f flag. This option is useful for running ///
in a trigger or script. ///
///
The -t flag changes the 'Type' of the change to 'restricted' ///
or 'public' without displaying the change form. This option is ///
useful for running in a trigger or script. ///
///
The 'Type' field can be used to hide the change or its description ///
from users. Valid values for this field are 'public' (default), and ///
'restricted'. A shelved or committed change that is 'restricted' is ///
accessible only to users who own the change or have 'list' permission ///
to at least one file in the change. A pending (not shelved) change ///
is accessible to its owner. Public changes are accessible to all ///
users. This setting affects the output of the 'p4 change', ///
'p4 changes', and 'p4 describe' commands. ///
///
If a user is not permitted to have access to a restricted change, ///
The 'Description' text is replaced with a 'no permission' message ///
(see 'Type' field). Users with admin permission can override the ///
restriction using the -f flag. ///
///
///
/// /// To get changelist 25: /// /// Changelist c = Repository.GetChangelist(25, null); /// /// /// public Changelist GetChangelist(int changeId, Options options) { P4Command cmd = null; if (options == null) { options = new Options(); } if (changeId > 0) { cmd = new P4Command(this, "describe", true, changeId.ToString()); } else { cmd = new P4Command(this, "change", true); options["-o"] = null; } P4CommandResult results = cmd.Run(options); if (results.Success) { if ((results.TaggedOutput == null) || (results.TaggedOutput.Count <= 0)) { return null; } bool dst_mismatch = false; string offset = string.Empty; if (Server != null && Server.Metadata != null) { offset = Server.Metadata.DateTimeOffset; dst_mismatch = FormBase.DSTMismatch(Server.Metadata); } Changelist value = new Changelist(); value.initialize(Connection); if (options.ContainsKey("-S")) { value.FromChangeCmdTaggedOutput((results.TaggedOutput[0]),true,offset,dst_mismatch); } else { value.FromChangeCmdTaggedOutput((results.TaggedOutput[0]),offset,dst_mismatch); } return value; } else { P4Exception.Throw(results.ErrorList); } return null; } /// /// Get the record for an existing change from the repository. /// /// Changelist name /// '-f' or '-s' are valid flags to use when fetching an existing change /// The Changelist object if new change was found, null if creation failed /// ///
///
p4 help change ///
///
change -- Create or edit a changelist description ///
changelist -- synonym for 'change' ///
///
p4 change [-s] [-f | -u] [[-O] changelist#] ///
p4 change -d [-f -s -O] changelist# ///
p4 change -o [-s] [-f] [[-O] changelist#] ///
p4 change -i [-s] [-f | -u] ///
p4 change -t restricted | public [-U user] [-f | -u | -O] changelist# ///
p4 change -U user [-t restricted | public] [-f] changelist# ///
///
'p4 change' creates and edits changelists and their descriptions. ///
With no argument, 'p4 change' creates a new changelist. If a ///
changelist number is specified, 'p4 change' edits an existing ///
pending changelist. In both cases, the changelist specification ///
is placed into a form and the user's editor is invoked. ///
///
The -d flag deletes a pending changelist, if it has no opened files ///
and no pending fixes associated with it. Use 'p4 opened -a' to ///
report on opened files and 'p4 reopen' to move them to another ///
changelist. Use 'p4 fixes -c changelist#' to report on pending ///
fixes and 'p4 fix -d -c changelist# jobs...' to delete pending ///
fixes. The changelist can be deleted only by the user and client ///
who created it, or by a user with 'admin' privilege using the -f ///
flag. ///
///
The -o flag writes the changelist specification to the standard ///
output. The user's editor is not invoked. ///
///
The -i flag reads a changelist specification from the standard ///
input. The user's editor is not invoked. ///
///
The -f flag forces the update or deletion of other users' pending ///
changelists. -f can also force the deletion of submitted changelists ///
after they have been emptied of files using 'p4 obliterate'. By ///
default, submitted changelists cannot be changed. The -f flag can ///
also force display of the 'Description' field in a restricted ///
changelist. Finally the -f flag can force changing the 'User' of ///
an empty pending change via -U. The -f flag requires 'admin' ///
access granted by 'p4 protect'. The -f and -u flags are mutually ///
exclusive. ///
///
The -u flag can force the update of a submitted change by the owner ///
of the change. Only the Jobs, Type, and Description fields can be ///
changed using the -u flag. The -f and -u flags cannot be used in ///
the same change command. ///
///
The -s flag extends the list of jobs to include the fix status ///
for each job. On new changelists, the fix status begins as the ///
special status 'ignore', which, if left unchanged simply excludes ///
the job from those being fixed. Otherwise, the fix status, like ///
that applied with 'p4 fix -s', becomes the job's status when ///
the changelist is committed. Note that this option exists ///
to support integration with external defect trackers. ///
///
The -O flag specifies that the changelist number is the original ///
number of a changelist which was renamed on submit. ///
///
The -U flag changes the 'User' of an empty pending change to the ///
specified user. The user field can only be changed using this flag ///
by the user who created the change, or by a user with 'admin' ///
privilege using the -f flag. This option is useful for running ///
in a trigger or script. ///
///
The -t flag changes the 'Type' of the change to 'restricted' ///
or 'public' without displaying the change form. This option is ///
useful for running in a trigger or script. ///
///
The 'Type' field can be used to hide the change or its description ///
from users. Valid values for this field are 'public' (default), and ///
'restricted'. A shelved or committed change that is 'restricted' is ///
accessible only to users who own the change or have 'list' permission ///
to at least one file in the change. A pending (not shelved) change ///
is accessible to its owner. Public changes are accessible to all ///
users. This setting affects the output of the 'p4 change', ///
'p4 changes', and 'p4 describe' commands. ///
///
If a user is not permitted to have access to a restricted change, ///
The 'Description' text is replaced with a 'no permission' message ///
(see 'Type' field). Users with admin permission can override the ///
restriction using the -f flag. ///
///
///
/// /// To get changelist 25: /// /// Changelist c = Repository.GetChangelist(25); /// /// public Changelist GetChangelist(int changeId) { return GetChangelist(changeId, null); } /// /// Get a list of changes from the repository /// /// options for the changes command /// array of FileSpecs for the changes command /// A list containing the matching changes /// ///
p4 help changes ///
///
changes -- Display list of pending and submitted changelists ///
changelists -- synonym for 'changes' ///
///
p4 changes [options] [file[revRange] ...] ///
///
options: -i -t -l -L -f -c client -m max -s status -u user ///
///
Returns a list of all pending and submitted changelists currently ///
stored in the server. ///
///
If files are specified, 'p4 changes' lists only changelists that ///
affect those files. If the file specification includes a revision ///
range, 'p4 changes' lists only submitted changelists that affect ///
the specified revisions. See 'p4 help revisions' for details. ///
///
If files are not specified, 'p4 changes' limits its report ///
according to each change's type ('public' or 'restricted'). ///
If a submitted or shelved change is restricted, the change is ///
not reported unless the user owns the change or has list ///
permission for at least one file in the change. Only the owner ///
of a restricted and pending (not shelved) change is permitted ///
to see it. ///
///
The -i flag also includes any changelists integrated into the ///
specified files. ///
///
The -t flag displays the time as well as the date. ///
///
The -l flag displays the full text of the changelist ///
descriptions. ///
///
The -L flag displays the changelist descriptions, truncated to 250 ///
characters if longer. ///
///
The -f flag enables admin users to view restricted changes. ///
///
The -c client flag displays only submitted by the specified client. ///
///
The -m max flag limits changes to the 'max' most recent. ///
///
The -s status flag limits the output to pending, shelved or ///
submitted changelists. ///
///
The -u user flag displays only changes owned by the specified user. ///
///
///
/// /// To get all changelists owned by user bsmith: /// /// ChangesCmdOptions opts =new ChangesCmdOptions(ChangesCmdFlags.None, /// null, 0, ChangeListStatus.None, "bsmith"); /// /// IList<Changelist> changes = /// Repository.GetChangelists(opts, null); /// /// To get all shelved changelists in file path //depot/main/...: /// /// ChangesCmdOptions opts =new ChangesCmdOptions(ChangesCmdFlags.None, /// null, 0, ChangeListStatus.Shelved, null); /// /// FileSpec file = /// new FileSpec(new DepotPath("//depot/main/..."), null, null, null); /// /// IList<Changelist> changes = /// Repository.GetChangelists(opts, file); /// /// To the 20 latest submitted changelists from client "build_workspace" /// with their full description: /// /// ChangesCmdOptions opts =new ChangesCmdOptions(ChangesCmdFlags.FullDescription, /// "build_workspace", 20, ChangeListStatus.Submitted, null); /// /// IList<Changelist> changes = /// Repository.GetChangelists(opts, null); /// /// To get all pending changelists as an admin user in file path /// //depot/finance/... including restricted changelists: /// /// ChangesCmdOptions opts =new ChangesCmdOptions(ChangesCmdFlags.ViewRestricted, /// null, 0, ChangeListStatus.Pending, null); /// /// FileSpec file = /// new FileSpec(new DepotPath("//depot/finance/..."), null, null, null); /// /// IList<Changelist> changes = /// Repository.GetChangelists(opts, file); /// /// /// public IList GetChangelists(Options options, params FileSpec[] files) { P4Command cmd = null; if ((files != null) && (files.Length > 0)) { cmd = new P4Command(this, "changes", true, FileSpec.ToStrings(files)); } else { cmd = new P4Command(this, "changes", true); } P4CommandResult results = cmd.Run(options); if (results.Success) { if ((results.TaggedOutput == null) || (results.TaggedOutput.Count <= 0)) { return null; } List value = new List(); bool dst_mismatch = false; string offset = string.Empty; if (Server != null && Server.Metadata != null) { offset = Server.Metadata.DateTimeOffset; //dst_mismatch = FormBase.DSTMismatch(Server.Metadata); } foreach (TaggedObject obj in results.TaggedOutput) { Changelist change = new Changelist(); change.initialize(Connection); change.FromChangeCmdTaggedOutput(obj,offset,dst_mismatch); value.Add(change); } return value; } else { P4Exception.Throw(results.ErrorList); } return null; } /// /// Delete a change from the repository /// /// The change to be deleted /// The '-f' and '-s' flags are valid when deleting an existing change /// /// Get the record for an existing change from the repository. /// /// Changelist name /// '-f' is a valid flag to use when deleting an existing change /// The Changelist object if new change was found, null if creation failed /// ///
///
p4 help change ///
///
change -- Create or edit a changelist description ///
changelist -- synonym for 'change' ///
///
p4 change [-s] [-f | -u] [[-O] changelist#] ///
p4 change -d [-f -s -O] changelist# ///
p4 change -o [-s] [-f] [[-O] changelist#] ///
p4 change -i [-s] [-f | -u] ///
p4 change -t restricted | public [-U user] [-f | -u | -O] changelist# ///
p4 change -U user [-t restricted | public] [-f] changelist# ///
///
'p4 change' creates and edits changelists and their descriptions. ///
With no argument, 'p4 change' creates a new changelist. If a ///
changelist number is specified, 'p4 change' edits an existing ///
pending changelist. In both cases, the changelist specification ///
is placed into a form and the user's editor is invoked. ///
///
The -d flag deletes a pending changelist, if it has no opened files ///
and no pending fixes associated with it. Use 'p4 opened -a' to ///
report on opened files and 'p4 reopen' to move them to another ///
changelist. Use 'p4 fixes -c changelist#' to report on pending ///
fixes and 'p4 fix -d -c changelist# jobs...' to delete pending ///
fixes. The changelist can be deleted only by the user and client ///
who created it, or by a user with 'admin' privilege using the -f ///
flag. ///
///
The -o flag writes the changelist specification to the standard ///
output. The user's editor is not invoked. ///
///
The -i flag reads a changelist specification from the standard ///
input. The user's editor is not invoked. ///
///
The -f flag forces the update or deletion of other users' pending ///
changelists. -f can also force the deletion of submitted changelists ///
after they have been emptied of files using 'p4 obliterate'. By ///
default, submitted changelists cannot be changed. The -f flag can ///
also force display of the 'Description' field in a restricted ///
changelist. Finally the -f flag can force changing the 'User' of ///
an empty pending change via -U. The -f flag requires 'admin' ///
access granted by 'p4 protect'. The -f and -u flags are mutually ///
exclusive. ///
///
The -u flag can force the update of a submitted change by the owner ///
of the change. Only the Jobs, Type, and Description fields can be ///
changed using the -u flag. The -f and -u flags cannot be used in ///
the same change command. ///
///
The -s flag extends the list of jobs to include the fix status ///
for each job. On new changelists, the fix status begins as the ///
special status 'ignore', which, if left unchanged simply excludes ///
the job from those being fixed. Otherwise, the fix status, like ///
that applied with 'p4 fix -s', becomes the job's status when ///
the changelist is committed. Note that this option exists ///
to support integration with external defect trackers. ///
///
The -O flag specifies that the changelist number is the original ///
number of a changelist which was renamed on submit. ///
///
The -U flag changes the 'User' of an empty pending change to the ///
specified user. The user field can only be changed using this flag ///
by the user who created the change, or by a user with 'admin' ///
privilege using the -f flag. This option is useful for running ///
in a trigger or script. ///
///
The -t flag changes the 'Type' of the change to 'restricted' ///
or 'public' without displaying the change form. This option is ///
useful for running in a trigger or script. ///
///
The 'Type' field can be used to hide the change or its description ///
from users. Valid values for this field are 'public' (default), and ///
'restricted'. A shelved or committed change that is 'restricted' is ///
accessible only to users who own the change or have 'list' permission ///
to at least one file in the change. A pending (not shelved) change ///
is accessible to its owner. Public changes are accessible to all ///
users. This setting affects the output of the 'p4 change', ///
'p4 changes', and 'p4 describe' commands. ///
///
If a user is not permitted to have access to a restricted change, ///
The 'Description' text is replaced with a 'no permission' message ///
(see 'Type' field). Users with admin permission can override the ///
restriction using the -f flag. ///
///
///
/// /// To delete pending changelist 34: /// /// Repository.DeleteChangelist(34,null); /// /// To delete pending changelist 34 as an admin user /// who is not owner of the change: /// /// ChangeCmdOptions opts = new ChangeCmdOptions(ChangeCmdFlags.Force); /// Repository.DeleteChangelist(34, opts); /// /// /// public void DeleteChangelist(Changelist change, Options options) { if (change == null) { throw new ArgumentNullException("change"); } P4Command cmd = new P4Command(this, "change", true, change.Id.ToString()); if (options == null) { options = new Options(); } options["-d"] = null; P4CommandResult results = cmd.Run(options); if (results.Success == false) { P4Exception.Throw(results.ErrorList); } } } }