/******************************************************************************* 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 : Options.cs * * Author(s) : wjb, dbb * * Description : Classes used to define command options * ******************************************************************************/ using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Perforce.P4 { /// /// A generic list of command options and values. /// public partial class Options : Dictionary { /// /// Construct an blank Options object /// public Options() : base() { } public override string ToString() { StringBuilder buf = new StringBuilder(this.Count * 256); foreach (string key in this.Keys) { buf.Append(key); if (String.IsNullOrEmpty(this[key]) == false) { buf.Append(' '); buf.Append(this[key]); } buf.Append(' '); } return buf.ToString(); } public static implicit operator StringList(Options o) { if (o == null) return null; StringList buf = new StringList(); foreach (string key in o.Keys) { buf.Add(key); if (String.IsNullOrEmpty(o[key]) == false) { buf.Add(o[key]); } } return buf; } public StringList ToStringList() { StringList list = (StringList) this; return list; } } /// /// Flags for the add command. /// [Flags] public enum AddFilesCmdFlags { /// /// No flags. /// None = 0x0000, /// /// As a shortcut to reverting and re-adding, you can use the -d /// flag to reopen currently-open files for add (downgrade) under /// the following circumstances: /// /// A file that is 'opened for edit' and is synced to the head /// revision, and the head revision has been deleted (or moved). /// /// A file that is 'opened for move/add' can be downgraded to add, /// which is useful when the source of the move has been deleted /// or moved. Typically, under these circumstances, your only /// alternative is to revert. In this case, breaking the move /// connection enables you to preserve any content changes in the /// new file and safely revert the source file (of the move). /// Downgrade = 0x0001, /// /// To add files with filenames that contain wildcard characters, specify /// the -f flag. Filenames that contain the special characters '@', '#', /// '%' or '*' are reformatted to encode the characters using ASCII /// hexadecimal representation. /// KeepWildcards = 0x0002, /// /// The -I flag informs the client that it should not perform any ignore /// checking configured by P4IGNORE. /// NoP4Ignore = 0x0004, /// /// The -n flag, displays a preview of the specified add operation without /// changing any files or metadata. /// PreviewOnly = 0x00084 }; public partial class Options { /// /// Options for the Add command. /// /// Flags for the command /// Optional changelist for the fies /// Optional file type for the files /// /// ///
p4 help add ///
///
add -- Open a new file to add it to the depot ///
///
p4 add [-c changelist#] [-d -f -n] [-t filetype] file ... ///
///
Open a file for adding to the depot. If the file exists on the ///
client, it is read to determine if it is text or binary. If it does ///
not exist, it is assumed to be text. To be added, the file must not ///
already reside in the depot, or it must be deleted at the current ///
head revision. Files can be deleted and re-added. ///
///
To associate the open files with a specific pending changelist, use ///
the -c flag; if you omit the -c flag, the open files are associated ///
with the default changelist. If file is already open, it is moved ///
into the specified pending changelist. You cannot reopen a file for ///
add unless it is already open for add. ///
///
As a shortcut to reverting and re-adding, you can use the -d ///
flag to reopen currently-open files for add (downgrade) under ///
the following circumstances: ///
///
A file that is 'opened for edit' and is synced to the head ///
revision, and the head revision has been deleted (or moved). ///
///
A file that is 'opened for move/add' can be downgraded to add, ///
which is useful when the source of the move has been deleted ///
or moved. Typically, under these circumstances, your only ///
alternative is to revert. In this case, breaking the move ///
connection enables you to preserve any content changes in the ///
new file and safely revert the source file (of the move). ///
///
To specify file type, use the -t flag. By default, 'p4 add' ///
determines file type using the name-to-type mapping table managed ///
by 'p4 typemap' and by examining the file's contents and execute ///
permission bit. If the file type specified by -t or configured in ///
the typemap table is a partial filetype, the resulting modifier is ///
applied to the file type that is determined by 'p4 add'. For more ///
details, see 'p4 help filetypes'. ///
///
To add files with filenames that contain wildcard characters, specify ///
the -f flag. Filenames that contain the special characters '@', '#', ///
'%' or '*' are reformatted to encode the characters using ASCII ///
hexadecimal representation. After the files are added, you must ///
refer to them using the reformatted file name, because Perforce ///
does not recognize the local filesystem name. ///
///
The -n flag displays a preview of the specified add operation without ///
changing any files or metadata. ///
///
///
public Options(AddFilesCmdFlags flags, int changeList, FileType fileType) { if (changeList >= 0) { this["-c"] = changeList.ToString(); } if (flags == AddFilesCmdFlags.Downgrade) { this["-d"] = null; } if (flags == AddFilesCmdFlags.KeepWildcards) { this["-f"] = null; } if (flags == AddFilesCmdFlags.NoP4Ignore) { this["-I"] = null; } if (flags == AddFilesCmdFlags.PreviewOnly) { this["-n"] = null; } if (fileType != null) { this["-t"] = fileType.ToString(); } } } /// /// Add command options /// public class AddFilesCmdOptions : Options { /// /// Options for the Add command. /// /// Flags for the command /// Optional changelist for the fies /// Optional file type for the files /// /// ///
p4 help add ///
///
add -- Open a new file to add it to the depot ///
///
p4 add [-c changelist#] [-d -f -n] [-t filetype] file ... ///
///
Open a file for adding to the depot. If the file exists on the ///
client, it is read to determine if it is text or binary. If it does ///
not exist, it is assumed to be text. To be added, the file must not ///
already reside in the depot, or it must be deleted at the current ///
head revision. Files can be deleted and re-added. ///
///
To associate the open files with a specific pending changelist, use ///
the -c flag; if you omit the -c flag, the open files are associated ///
with the default changelist. If file is already open, it is moved ///
into the specified pending changelist. You cannot reopen a file for ///
add unless it is already open for add. ///
///
As a shortcut to reverting and re-adding, you can use the -d ///
flag to reopen currently-open files for add (downgrade) under ///
the following circumstances: ///
///
A file that is 'opened for edit' and is synced to the head ///
revision, and the head revision has been deleted (or moved). ///
///
A file that is 'opened for move/add' can be downgraded to add, ///
which is useful when the source of the move has been deleted ///
or moved. Typically, under these circumstances, your only ///
alternative is to revert. In this case, breaking the move ///
connection enables you to preserve any content changes in the ///
new file and safely revert the source file (of the move). ///
///
To specify file type, use the -t flag. By default, 'p4 add' ///
determines file type using the name-to-type mapping table managed ///
by 'p4 typemap' and by examining the file's contents and execute ///
permission bit. If the file type specified by -t or configured in ///
the typemap table is a partial filetype, the resulting modifier is ///
applied to the file type that is determined by 'p4 add'. For more ///
details, see 'p4 help filetypes'. ///
///
To add files with filenames that contain wildcard characters, specify ///
the -f flag. Filenames that contain the special characters '@', '#', ///
'%' or '*' are reformatted to encode the characters using ASCII ///
hexadecimal representation. After the files are added, you must ///
refer to them using the reformatted file name, because Perforce ///
does not recognize the local filesystem name. ///
///
The -n flag displays a preview of the specified add operation without ///
changing any files or metadata. ///
///
///
public AddFilesCmdOptions(AddFilesCmdFlags flags, int changeList, FileType fileType) : base(flags, changeList, fileType) { } } /// /// Flags for the delete command. /// [Flags] public enum DeleteFilesCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -n flag, displays a preview of the operation without changing any /// files or metadata. /// PreviewOnly = 0x0001, /// /// The -v flag, enables you to delete files that are not synced to the /// client workspace. /// DeleteUnsynced = 0x0002, /// /// The -k flag performs the delete on the server without modifying /// client files. Use with caution, as an incorrect delete can cause /// discrepancies between the state of the client and the corresponding /// server metadata. /// ServerOnly = 0x004 }; public partial class Options { /// /// Options for the delete command. /// /// /// /// /// ///
p4 help delete ///
///
delete -- Open an existing file for deletion from the depot ///
///
p4 delete [-c changelist#] [-n -v -k] file ... ///
///
Opens a depot file for deletion. ///
If the file is synced in the client workspace, it is removed. If a ///
pending changelist number is specified using with the -c flag, the ///
file is opened for delete in that changelist. Otherwise, it is opened ///
in the default pending changelist. ///
///
Files that are deleted generally do not appear on the have list. ///
///
The -n flag displays a preview of the operation without changing any ///
files or metadata. ///
///
The -v flag enables you to delete files that are not synced to the ///
client workspace. ///
///
The -k flag performs the delete on the server without modifying ///
client files. Use with caution, as an incorrect delete can cause ///
discrepancies between the state of the client and the corresponding ///
server metadata. ///
///
public Options(DeleteFilesCmdFlags flags, int changeList) { if (changeList >= 0) { this["-c"] = changeList.ToString(); } if (flags == DeleteFilesCmdFlags.PreviewOnly) { this["-n"] = null; } if (flags == DeleteFilesCmdFlags.DeleteUnsynced) { this["-v"] = null; } if (flags == DeleteFilesCmdFlags.ServerOnly) { this["-k"] = null; } } } /// /// delete command options /// public class DeleteFilesCmdOptions : Options { /// /// Options for the delete command. /// /// /// /// /// ///
p4 help delete ///
///
delete -- Open an existing file for deletion from the depot ///
///
p4 delete [-c changelist#] [-n -v -k] file ... ///
///
Opens a depot file for deletion. ///
If the file is synced in the client workspace, it is removed. If a ///
pending changelist number is specified using with the -c flag, the ///
file is opened for delete in that changelist. Otherwise, it is opened ///
in the default pending changelist. ///
///
Files that are deleted generally do not appear on the have list. ///
///
The -n flag displays a preview of the operation without changing any ///
files or metadata. ///
///
The -v flag enables you to delete files that are not synced to the ///
client workspace. ///
///
The -k flag performs the delete on the server without modifying ///
client files. Use with caution, as an incorrect delete can cause ///
discrepancies between the state of the client and the corresponding ///
server metadata. ///
///
public DeleteFilesCmdOptions(DeleteFilesCmdFlags flags, int changeList) : base(flags, changeList) { } } /// /// Flags for the edit command. /// [Flags] public enum EditFilesCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -n flag, previews the operation without changing any files or /// metadata. /// PreviewOnly = 0x0001, /// /// The -k flag, updates metadata without transferring files to the /// workspace. /// /// ServerOnly = 0x0002, }; public partial class Options { /// /// Options for the edit command /// /// /// /// /// /// ///
p4 help edit ///
///
edit -- Open an existing file for edit ///
///
p4 edit [-c changelist#] [-k -n] [-t filetype] file ... ///
///
Open an existing file for edit. The server records the fact that ///
the current user has opened the file in the current workspace, and ///
changes the file permission from read-only to read/write. ///
///
If -c changelist# is included, the file opened in the specified ///
pending changelist. If changelist number is omitted, the file is ///
opened in the 'default' changelist. ///
///
If -t filetype is specified, the file is assigned that Perforce ///
filetype. Otherwise, the filetype of the previous revision is reused. ///
If a partial filetype is specified, it is combined with the current ///
filetype.For details, see 'p4 help filetypes'. ///
Using a filetype of 'auto' will cause the filetype to be choosen ///
as if the file were being added, that is the typemap will be ///
considered and the file contents may be examined. ///
///
The -n flag previews the operation without changing any files or ///
metadata. ///
///
The -k flag updates metadata without transferring files to the ///
workspace. This option can be used to tell the server that files in ///
a client workspace are already editable, even if they are not in the ///
client view. Typically this flag is used to correct the Perforce ///
server when it is wrong about the state of files in the client ///
workspace, but incorrect use of this option can result in inaccurate ///
file status information. ///
///
///
public Options(EditFilesCmdFlags flags, int changeList, FileType fileType) { if (changeList > 0) { this["-c"] = changeList.ToString(); } if (flags == EditFilesCmdFlags.ServerOnly) { this["-k"] = null; } if (flags == EditFilesCmdFlags.PreviewOnly) { this["-n"] = null; } if (fileType != null) { this["-t"] = fileType.ToString(); } } } /// /// Options for the edit command /// public class EditCmdOptions : Options { /// /// Options for the edit command /// /// /// /// /// /// ///
p4 help edit ///
///
edit -- Open an existing file for edit ///
///
p4 edit [-c changelist#] [-k -n] [-t filetype] file ... ///
///
Open an existing file for edit. The server records the fact that ///
the current user has opened the file in the current workspace, and ///
changes the file permission from read-only to read/write. ///
///
If -c changelist# is included, the file opened in the specified ///
pending changelist. If changelist number is omitted, the file is ///
opened in the 'default' changelist. ///
///
If -t filetype is specified, the file is assigned that Perforce ///
filetype. Otherwise, the filetype of the previous revision is reused. ///
If a partial filetype is specified, it is combined with the current ///
filetype.For details, see 'p4 help filetypes'. ///
Using a filetype of 'auto' will cause the filetype to be choosen ///
as if the file were being added, that is the typemap will be ///
considered and the file contents may be examined. ///
///
The -n flag previews the operation without changing any files or ///
metadata. ///
///
The -k flag updates metadata without transferring files to the ///
workspace. This option can be used to tell the server that files in ///
a client workspace are already editable, even if they are not in the ///
client view. Typically this flag is used to correct the Perforce ///
server when it is wrong about the state of files in the client ///
workspace, but incorrect use of this option can result in inaccurate ///
file status information. ///
///
///
public EditCmdOptions(EditFilesCmdFlags flags, int changeList, FileType fileType) :base(flags, changeList, fileType) {} } /// /// Flags for the integrate command. /// [Flags] public enum IntegrateFilesCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -f flag forces integrate to ignore previous integration history. ///
p4 help integrate ///
///
integrate -- Integrate one set of files into another ///
///
p4 integrate [options] fromFile[revRange] toFile ///
p4 integrate [options] -b branch [-r] [toFile[revRange] ...] ///
p4 integrate [options] -b branch -s fromFile[revRange] [toFile ...] ///
p4 integrate [options] -S stream [-r] [-P parent] [file[revRange] ...] ///
///
options: -c changelist# -d -f -h -i -o -n -m max -t -v ///
-D<flags> -R<flags> ///
///
'p4 integrate' integrates one set of files (the 'source') into ///
another (the 'target'). ///
///
(See also 'p4 merge' and 'p4 copy', variants of 'p4 integrate' that ///
may be easier and more effective for the task at hand.) ///
///
Using the client workspace as a staging area, 'p4 integrate' adds and ///
deletes target files per changes in the source, and schedules all ///
other affected target files to be resolved. Target files outside of ///
the current client view are not affected. Source files need not be ///
within the client view. ///
///
'p4 resolve' must be used to merge file content, and to resolve ///
filename and filetype changes. 'p4 submit' commits integrated files ///
to the depot. Unresolved files may not be submitted. Integrations ///
can be shelved with 'p4 shelve' and abandoned with 'p4 revert'. The ///
commands 'p4 integrated' and 'p4 filelog' display integration history. ///
///
When 'p4 integrate' schedules a workspace file to be resolved, it ///
leaves it read-only. 'p4 resolve' can operate on a read-only file. ///
For other pre-submit changes, 'p4 edit' must be used to make the ///
file writable. ///
///
Source and target files can be specified either on the 'p4 integrate' ///
command line or through a branch view. On the command line, fromFile ///
is the source file set and toFile is the target file set. With a ///
branch view, one or more toFile arguments can be given to limit the ///
scope of the target file set. ///
///
revRange is a revision or a revision range that limits the span of ///
source history to be probed for unintegrated revisions. revRange ///
can be used on fromFile, or on toFile, but not on both. When used on ///
toFile, it refers to source revisions, not to target revisions. For ///
details about revision specifiers, see 'p4 help revisions'. ///
///
The -S flag makes 'p4 integrate' use a stream's branch view. (See ///
'p4 help stream'.) The source is the stream itself, and the target is ///
the stream's parent. With -r, the direction is reversed. -P can be ///
used to specify a parent stream other than the stream's actual parent. ///
Note that to submit integrated stream files, the current client must ///
be dedicated to the target stream. (See 'p4 help client'.) ///
///
The -b flag makes 'p4 integrate' use a user-defined branch view. ///
(See 'p4 help branch'.) The source is the left side of the branch view ///
and the target is the right side. With -r, the direction is reversed. ///
///
The -s flag can be used with -b to cause fromFile to be treated as ///
the source, and both sides of the branch view to be treated as the ///
target, per the branch view mapping. Optional toFile arguments may ///
be given to further restrict the scope of the target file set. The ///
-r flag is ignored when -s is used. ///
///
Note that 'p4 integrate' automatically adusts source-to-target ///
mappings for moved and renamed files. (Adjustment occurs only if ///
the 'p4 move' command was used to move/rename files.) The scope of ///
source and target file sets must include both the old-named and the ///
new-named files for mappings to be adjusted. Moved source files may ///
cause target files to be scheduled for filename resolves. ///
///
The -f flag forces integrate to ignore integration history and treat ///
all source revisions as unintegrated. It is meant to be used with ///
revRange to force reintegration of specific, previously integrated ///
revisions. ///
///
The -i flag enables merging between files that have no prior ///
integration history. By default, 'p4 integrate' requires a prior ///
integration in order to identify a base for merging. The -i flag ///
allows the integration, and schedules the target file to be resolved ///
using the first source revision as the merge base. ///
///
The -o flag causes more merge information to be output. For each ///
target file scheduled to be resolved, the base file revision and the ///
source file revision are shown. (After running 'p4 integrate', the ///
same information is available from 'p4 resolve -o'.) ///
///
The -R flags modify the way resolves are scheduled: ///
///
-Rb Schedules 'branch resolves' instead of branching new ///
target files automatically. ///
///
-Rd Schedules 'delete resolves' instead of deleting ///
target files automatically. ///
///
-Rs Skips cherry-picked revisions already integrated. ///
This can improve merge results, but can also cause ///
multiple resolves per file to be scheduled. ///
///
The -D flags modify the way deleted files are treated: ///
///
-Dt If the target file has been deleted and the source ///
file has changed, re-branch the source file on top ///
of the target file instead of scheduling a resolve. ///
///
-Ds If the source file has been deleted and the target ///
file has changed, delete the target file instead of ///
scheduling a resolve. ///
///
-Di If the source file has been deleted and re-added, ///
probe revisions that precede the deletion to find ///
unintegrated revisions. By default, 'p4 integrate' ///
starts probing at the last re-added revision. ///
///
The -d flag is a shorthand for all -D flags used together. ///
///
The -h flag leaves the target files at the revision currently synced ///
to the client (the '#have' revision). By default, target files are ///
automatically synced to the head revision by 'p4 integrate'. ///
///
The -t flag propagates source filetypes instead of scheduling ///
filetype conflicts to be resolved. ///
///
The -m flag limits integration to the first 'max' number of files. ///
///
The -n flag displays a preview of integration, without actually ///
doing anything. ///
///
If -c changelist# is specified, the files are opened in the ///
designated numbered pending changelist instead of the 'default' ///
changelist. ///
///
The -v flag causes a 'virtual' integration that does not modify ///
client workspace files unless target files need to be resolved. ///
After submitting a virtual integration, 'p4 sync' can be used to ///
update the workspace. ///
///
/// Force = 0x0001, /// /// -Dt If the target file has been deleted and the source /// file has changed, re-branch the source file on top /// of the target file. /// BranchIfTargetDeleted = 0x0002, /// /// -Ds If the source file has been deleted and the target /// file has changed, delete the target file. /// DeleteIfSourceDeleted = 0x0004, /// /// -Di If the source file has been deleted and re-added, /// attempt to integrate all outstanding revisions /// of the file, including revisions prior to the /// delete. By default, 'p4 integrate' only considers /// revisions since the last add. /// IntegrateAllIfSourceDeleted = 0x0008, /// /// The -h flag leaves the target files at the revision currently synced /// to the client (the '#have' revision). By default, target files are /// automatically synced to the head revision by 'p4 integrate'. /// LeaveHaveVersion = 0x0010, /// /// The -i flag enables integration between files that have no integration ///
p4 help integrate ///
///
integrate -- Integrate one set of files into another ///
///
p4 integrate [options] fromFile[revRange] toFile ///
p4 integrate [options] -b branch [-r] [toFile[revRange] ...] ///
p4 integrate [options] -b branch -s fromFile[revRange] [toFile ...] ///
p4 integrate [options] -S stream [-r] [-P parent] [file[revRange] ...] ///
///
options: -c changelist# -d -f -h -i -o -n -m max -t -v ///
-D<flags> -R<flags> ///
///
'p4 integrate' integrates one set of files (the 'source') into ///
another (the 'target'). ///
///
(See also 'p4 merge' and 'p4 copy', variants of 'p4 integrate' that ///
may be easier and more effective for the task at hand.) ///
///
Using the client workspace as a staging area, 'p4 integrate' adds and ///
deletes target files per changes in the source, and schedules all ///
other affected target files to be resolved. Target files outside of ///
the current client view are not affected. Source files need not be ///
within the client view. ///
///
'p4 resolve' must be used to merge file content, and to resolve ///
filename and filetype changes. 'p4 submit' commits integrated files ///
to the depot. Unresolved files may not be submitted. Integrations ///
can be shelved with 'p4 shelve' and abandoned with 'p4 revert'. The ///
commands 'p4 integrated' and 'p4 filelog' display integration history. ///
///
When 'p4 integrate' schedules a workspace file to be resolved, it ///
leaves it read-only. 'p4 resolve' can operate on a read-only file. ///
For other pre-submit changes, 'p4 edit' must be used to make the ///
file writable. ///
///
Source and target files can be specified either on the 'p4 integrate' ///
command line or through a branch view. On the command line, fromFile ///
is the source file set and toFile is the target file set. With a ///
branch view, one or more toFile arguments can be given to limit the ///
scope of the target file set. ///
///
revRange is a revision or a revision range that limits the span of ///
source history to be probed for unintegrated revisions. revRange ///
can be used on fromFile, or on toFile, but not on both. When used on ///
toFile, it refers to source revisions, not to target revisions. For ///
details about revision specifiers, see 'p4 help revisions'. ///
///
The -S flag makes 'p4 integrate' use a stream's branch view. (See ///
'p4 help stream'.) The source is the stream itself, and the target is ///
the stream's parent. With -r, the direction is reversed. -P can be ///
used to specify a parent stream other than the stream's actual parent. ///
Note that to submit integrated stream files, the current client must ///
be dedicated to the target stream. (See 'p4 help client'.) ///
///
The -b flag makes 'p4 integrate' use a user-defined branch view. ///
(See 'p4 help branch'.) The source is the left side of the branch view ///
and the target is the right side. With -r, the direction is reversed. ///
///
The -s flag can be used with -b to cause fromFile to be treated as ///
the source, and both sides of the branch view to be treated as the ///
target, per the branch view mapping. Optional toFile arguments may ///
be given to further restrict the scope of the target file set. The ///
-r flag is ignored when -s is used. ///
///
Note that 'p4 integrate' automatically adusts source-to-target ///
mappings for moved and renamed files. (Adjustment occurs only if ///
the 'p4 move' command was used to move/rename files.) The scope of ///
source and target file sets must include both the old-named and the ///
new-named files for mappings to be adjusted. Moved source files may ///
cause target files to be scheduled for filename resolves. ///
///
The -f flag forces integrate to ignore integration history and treat ///
all source revisions as unintegrated. It is meant to be used with ///
revRange to force reintegration of specific, previously integrated ///
revisions. ///
///
The -i flag enables merging between files that have no prior ///
integration history. By default, 'p4 integrate' requires a prior ///
integration in order to identify a base for merging. The -i flag ///
allows the integration, and schedules the target file to be resolved ///
using the first source revision as the merge base. ///
///
The -o flag causes more merge information to be output. For each ///
target file scheduled to be resolved, the base file revision and the ///
source file revision are shown. (After running 'p4 integrate', the ///
same information is available from 'p4 resolve -o'.) ///
///
The -R flags modify the way resolves are scheduled: ///
///
-Rb Schedules 'branch resolves' instead of branching new ///
target files automatically. ///
///
-Rd Schedules 'delete resolves' instead of deleting ///
target files automatically. ///
///
-Rs Skips cherry-picked revisions already integrated. ///
This can improve merge results, but can also cause ///
multiple resolves per file to be scheduled. ///
///
The -D flags modify the way deleted files are treated: ///
///
-Dt If the target file has been deleted and the source ///
file has changed, re-branch the source file on top ///
of the target file instead of scheduling a resolve. ///
///
-Ds If the source file has been deleted and the target ///
file has changed, delete the target file instead of ///
scheduling a resolve. ///
///
-Di If the source file has been deleted and re-added, ///
probe revisions that precede the deletion to find ///
unintegrated revisions. By default, 'p4 integrate' ///
starts probing at the last re-added revision. ///
///
The -d flag is a shorthand for all -D flags used together. ///
///
The -h flag leaves the target files at the revision currently synced ///
to the client (the '#have' revision). By default, target files are ///
automatically synced to the head revision by 'p4 integrate'. ///
///
The -t flag propagates source filetypes instead of scheduling ///
filetype conflicts to be resolved. ///
///
The -m flag limits integration to the first 'max' number of files. ///
///
The -n flag displays a preview of integration, without actually ///
doing anything. ///
///
If -c changelist# is specified, the files are opened in the ///
designated numbered pending changelist instead of the 'default' ///
changelist. ///
///
The -v flag causes a 'virtual' integration that does not modify ///
client workspace files unless target files need to be resolved. ///
After submitting a virtual integration, 'p4 sync' can be used to ///
update the workspace. ///
///
/// IntegrateUnrelated = 0x0020, /// /// The -o flag displays the base file name and revision that will be /// used in subsequent resolves if a resolve is needed. /// DisplayBaseFile = 0x0040, /// /// The -n flag displays a preview of required integrations. /// PreviewIntegrationsOnly = 0x0080, /// /// The -r flag reverses the mappings in the branch view, with the /// target files and source files exchanging place. The -b branch /// flag is required. /// SwapSourceAndTarget = 0x0100, /// /// The -s fromFile[revRange] flag causes the branch view to work ///
p4 help integrate ///
///
integrate -- Integrate one set of files into another ///
///
p4 integrate [options] fromFile[revRange] toFile ///
p4 integrate [options] -b branch [-r] [toFile[revRange] ...] ///
p4 integrate [options] -b branch -s fromFile[revRange] [toFile ...] ///
p4 integrate [options] -S stream [-r] [-P parent] [file[revRange] ...] ///
///
options: -c changelist# -d -f -h -i -o -n -m max -t -v ///
-D<flags> -R<flags> ///
///
'p4 integrate' integrates one set of files (the 'source') into ///
another (the 'target'). ///
///
(See also 'p4 merge' and 'p4 copy', variants of 'p4 integrate' that ///
may be easier and more effective for the task at hand.) ///
///
Using the client workspace as a staging area, 'p4 integrate' adds and ///
deletes target files per changes in the source, and schedules all ///
other affected target files to be resolved. Target files outside of ///
the current client view are not affected. Source files need not be ///
within the client view. ///
///
'p4 resolve' must be used to merge file content, and to resolve ///
filename and filetype changes. 'p4 submit' commits integrated files ///
to the depot. Unresolved files may not be submitted. Integrations ///
can be shelved with 'p4 shelve' and abandoned with 'p4 revert'. The ///
commands 'p4 integrated' and 'p4 filelog' display integration history. ///
///
When 'p4 integrate' schedules a workspace file to be resolved, it ///
leaves it read-only. 'p4 resolve' can operate on a read-only file. ///
For other pre-submit changes, 'p4 edit' must be used to make the ///
file writable. ///
///
Source and target files can be specified either on the 'p4 integrate' ///
command line or through a branch view. On the command line, fromFile ///
is the source file set and toFile is the target file set. With a ///
branch view, one or more toFile arguments can be given to limit the ///
scope of the target file set. ///
///
revRange is a revision or a revision range that limits the span of ///
source history to be probed for unintegrated revisions. revRange ///
can be used on fromFile, or on toFile, but not on both. When used on ///
toFile, it refers to source revisions, not to target revisions. For ///
details about revision specifiers, see 'p4 help revisions'. ///
///
The -S flag makes 'p4 integrate' use a stream's branch view. (See ///
'p4 help stream'.) The source is the stream itself, and the target is ///
the stream's parent. With -r, the direction is reversed. -P can be ///
used to specify a parent stream other than the stream's actual parent. ///
Note that to submit integrated stream files, the current client must ///
be dedicated to the target stream. (See 'p4 help client'.) ///
///
The -b flag makes 'p4 integrate' use a user-defined branch view. ///
(See 'p4 help branch'.) The source is the left side of the branch view ///
and the target is the right side. With -r, the direction is reversed. ///
///
The -s flag can be used with -b to cause fromFile to be treated as ///
the source, and both sides of the branch view to be treated as the ///
target, per the branch view mapping. Optional toFile arguments may ///
be given to further restrict the scope of the target file set. The ///
-r flag is ignored when -s is used. ///
///
Note that 'p4 integrate' automatically adusts source-to-target ///
mappings for moved and renamed files. (Adjustment occurs only if ///
the 'p4 move' command was used to move/rename files.) The scope of ///
source and target file sets must include both the old-named and the ///
new-named files for mappings to be adjusted. Moved source files may ///
cause target files to be scheduled for filename resolves. ///
///
The -f flag forces integrate to ignore integration history and treat ///
all source revisions as unintegrated. It is meant to be used with ///
revRange to force reintegration of specific, previously integrated ///
revisions. ///
///
The -i flag enables merging between files that have no prior ///
integration history. By default, 'p4 integrate' requires a prior ///
integration in order to identify a base for merging. The -i flag ///
allows the integration, and schedules the target file to be resolved ///
using the first source revision as the merge base. ///
///
The -o flag causes more merge information to be output. For each ///
target file scheduled to be resolved, the base file revision and the ///
source file revision are shown. (After running 'p4 integrate', the ///
same information is available from 'p4 resolve -o'.) ///
///
The -R flags modify the way resolves are scheduled: ///
///
-Rb Schedules 'branch resolves' instead of branching new ///
target files automatically. ///
///
-Rd Schedules 'delete resolves' instead of deleting ///
target files automatically. ///
///
-Rs Skips cherry-picked revisions already integrated. ///
This can improve merge results, but can also cause ///
multiple resolves per file to be scheduled. ///
///
The -D flags modify the way deleted files are treated: ///
///
-Dt If the target file has been deleted and the source ///
file has changed, re-branch the source file on top ///
of the target file instead of scheduling a resolve. ///
///
-Ds If the source file has been deleted and the target ///
file has changed, delete the target file instead of ///
scheduling a resolve. ///
///
-Di If the source file has been deleted and re-added, ///
probe revisions that precede the deletion to find ///
unintegrated revisions. By default, 'p4 integrate' ///
starts probing at the last re-added revision. ///
///
The -d flag is a shorthand for all -D flags used together. ///
///
The -h flag leaves the target files at the revision currently synced ///
to the client (the '#have' revision). By default, target files are ///
automatically synced to the head revision by 'p4 integrate'. ///
///
The -t flag propagates source filetypes instead of scheduling ///
filetype conflicts to be resolved. ///
///
The -m flag limits integration to the first 'max' number of files. ///
///
The -n flag displays a preview of integration, without actually ///
doing anything. ///
///
If -c changelist# is specified, the files are opened in the ///
designated numbered pending changelist instead of the 'default' ///
changelist. ///
///
The -v flag causes a 'virtual' integration that does not modify ///
client workspace files unless target files need to be resolved. ///
After submitting a virtual integration, 'p4 sync' can be used to ///
update the workspace. ///
///
/// BidirectionalView = 0x0200, /// /// The -t flag propagates the source file's filetype to the target file /// (By default, the target file retains its filetype.) ///
p4 help integrate ///
///
integrate -- Integrate one set of files into another ///
///
p4 integrate [options] fromFile[revRange] toFile ///
p4 integrate [options] -b branch [-r] [toFile[revRange] ...] ///
p4 integrate [options] -b branch -s fromFile[revRange] [toFile ...] ///
p4 integrate [options] -S stream [-r] [-P parent] [file[revRange] ...] ///
///
options: -c changelist# -d -f -h -i -o -n -m max -t -v ///
-D<flags> -R<flags> ///
///
'p4 integrate' integrates one set of files (the 'source') into ///
another (the 'target'). ///
///
(See also 'p4 merge' and 'p4 copy', variants of 'p4 integrate' that ///
may be easier and more effective for the task at hand.) ///
///
Using the client workspace as a staging area, 'p4 integrate' adds and ///
deletes target files per changes in the source, and schedules all ///
other affected target files to be resolved. Target files outside of ///
the current client view are not affected. Source files need not be ///
within the client view. ///
///
'p4 resolve' must be used to merge file content, and to resolve ///
filename and filetype changes. 'p4 submit' commits integrated files ///
to the depot. Unresolved files may not be submitted. Integrations ///
can be shelved with 'p4 shelve' and abandoned with 'p4 revert'. The ///
commands 'p4 integrated' and 'p4 filelog' display integration history. ///
///
When 'p4 integrate' schedules a workspace file to be resolved, it ///
leaves it read-only. 'p4 resolve' can operate on a read-only file. ///
For other pre-submit changes, 'p4 edit' must be used to make the ///
file writable. ///
///
Source and target files can be specified either on the 'p4 integrate' ///
command line or through a branch view. On the command line, fromFile ///
is the source file set and toFile is the target file set. With a ///
branch view, one or more toFile arguments can be given to limit the ///
scope of the target file set. ///
///
revRange is a revision or a revision range that limits the span of ///
source history to be probed for unintegrated revisions. revRange ///
can be used on fromFile, or on toFile, but not on both. When used on ///
toFile, it refers to source revisions, not to target revisions. For ///
details about revision specifiers, see 'p4 help revisions'. ///
///
The -S flag makes 'p4 integrate' use a stream's branch view. (See ///
'p4 help stream'.) The source is the stream itself, and the target is ///
the stream's parent. With -r, the direction is reversed. -P can be ///
used to specify a parent stream other than the stream's actual parent. ///
Note that to submit integrated stream files, the current client must ///
be dedicated to the target stream. (See 'p4 help client'.) ///
///
The -b flag makes 'p4 integrate' use a user-defined branch view. ///
(See 'p4 help branch'.) The source is the left side of the branch view ///
and the target is the right side. With -r, the direction is reversed. ///
///
The -s flag can be used with -b to cause fromFile to be treated as ///
the source, and both sides of the branch view to be treated as the ///
target, per the branch view mapping. Optional toFile arguments may ///
be given to further restrict the scope of the target file set. The ///
-r flag is ignored when -s is used. ///
///
Note that 'p4 integrate' automatically adusts source-to-target ///
mappings for moved and renamed files. (Adjustment occurs only if ///
the 'p4 move' command was used to move/rename files.) The scope of ///
source and target file sets must include both the old-named and the ///
new-named files for mappings to be adjusted. Moved source files may ///
cause target files to be scheduled for filename resolves. ///
///
The -f flag forces integrate to ignore integration history and treat ///
all source revisions as unintegrated. It is meant to be used with ///
revRange to force reintegration of specific, previously integrated ///
revisions. ///
///
The -i flag enables merging between files that have no prior ///
integration history. By default, 'p4 integrate' requires a prior ///
integration in order to identify a base for merging. The -i flag ///
allows the integration, and schedules the target file to be resolved ///
using the first source revision as the merge base. ///
///
The -o flag causes more merge information to be output. For each ///
target file scheduled to be resolved, the base file revision and the ///
source file revision are shown. (After running 'p4 integrate', the ///
same information is available from 'p4 resolve -o'.) ///
///
The -R flags modify the way resolves are scheduled: ///
///
-Rb Schedules 'branch resolves' instead of branching new ///
target files automatically. ///
///
-Rd Schedules 'delete resolves' instead of deleting ///
target files automatically. ///
///
-Rs Skips cherry-picked revisions already integrated. ///
This can improve merge results, but can also cause ///
multiple resolves per file to be scheduled. ///
///
The -D flags modify the way deleted files are treated: ///
///
-Dt If the target file has been deleted and the source ///
file has changed, re-branch the source file on top ///
of the target file instead of scheduling a resolve. ///
///
-Ds If the source file has been deleted and the target ///
file has changed, delete the target file instead of ///
scheduling a resolve. ///
///
-Di If the source file has been deleted and re-added, ///
probe revisions that precede the deletion to find ///
unintegrated revisions. By default, 'p4 integrate' ///
starts probing at the last re-added revision. ///
///
The -d flag is a shorthand for all -D flags used together. ///
///
The -h flag leaves the target files at the revision currently synced ///
to the client (the '#have' revision). By default, target files are ///
automatically synced to the head revision by 'p4 integrate'. ///
///
The -t flag propagates source filetypes instead of scheduling ///
filetype conflicts to be resolved. ///
///
The -m flag limits integration to the first 'max' number of files. ///
///
The -n flag displays a preview of integration, without actually ///
doing anything. ///
///
If -c changelist# is specified, the files are opened in the ///
designated numbered pending changelist instead of the 'default' ///
changelist. ///
///
The -v flag causes a 'virtual' integration that does not modify ///
client workspace files unless target files need to be resolved. ///
After submitting a virtual integration, 'p4 sync' can be used to ///
update the workspace. ///
///
/// PropogateType = 0x0400, /// /// The -v flag speeds integration by not syncing newly-branched files to /// the client. The files can be synced after they are submitted. /// DontCopyNewBranchFiles = 0x0800, /// /// -Rb Schedules 'branch resolves' instead of branching new /// target files automatically. /// BranchResolves = 0x1000, /// /// -Rd Schedules 'delete resolves' instead of deleting /// target files automatically. /// DeleteResolves = 0x2000, /// /// -Rs Skips cherry-picked revisions already integrated. /// This can improve merge results, but can also cause /// multiple resolves per file to be scheduled. /// SkipRevisions = 0x4000 }; public partial class Options { /// /// Options for the integrate command. /// /// /// /// ///
p4 help integrate ///
///
integrate -- Integrate one set of files into another ///
///
p4 integrate [options] fromFile[revRange] toFile ///
p4 integrate [options] -b branch [-r] [toFile[revRange] ...] ///
p4 integrate [options] -b branch -s fromFile[revRange] [toFile ...] ///
p4 integrate [options] -S stream [-r] [-P parent] [file[revRange] ...] ///
///
options: -c changelist# -d -f -h -i -o -n -m max -t -v ///
-D<flags> -R<flags> ///
///
'p4 integrate' integrates one set of files (the 'source') into ///
another (the 'target'). ///
///
(See also 'p4 merge' and 'p4 copy', variants of 'p4 integrate' that ///
may be easier and more effective for the task at hand.) ///
///
Using the client workspace as a staging area, 'p4 integrate' adds and ///
deletes target files per changes in the source, and schedules all ///
other affected target files to be resolved. Target files outside of ///
the current client view are not affected. Source files need not be ///
within the client view. ///
///
'p4 resolve' must be used to merge file content, and to resolve ///
filename and filetype changes. 'p4 submit' commits integrated files ///
to the depot. Unresolved files may not be submitted. Integrations ///
can be shelved with 'p4 shelve' and abandoned with 'p4 revert'. The ///
commands 'p4 integrated' and 'p4 filelog' display integration history. ///
///
When 'p4 integrate' schedules a workspace file to be resolved, it ///
leaves it read-only. 'p4 resolve' can operate on a read-only file. ///
For other pre-submit changes, 'p4 edit' must be used to make the ///
file writable. ///
///
Source and target files can be specified either on the 'p4 integrate' ///
command line or through a branch view. On the command line, fromFile ///
is the source file set and toFile is the target file set. With a ///
branch view, one or more toFile arguments can be given to limit the ///
scope of the target file set. ///
///
revRange is a revision or a revision range that limits the span of ///
source history to be probed for unintegrated revisions. revRange ///
can be used on fromFile, or on toFile, but not on both. When used on ///
toFile, it refers to source revisions, not to target revisions. For ///
details about revision specifiers, see 'p4 help revisions'. ///
///
The -S flag makes 'p4 integrate' use a stream's branch view. (See ///
'p4 help stream'.) The source is the stream itself, and the target is ///
the stream's parent. With -r, the direction is reversed. -P can be ///
used to specify a parent stream other than the stream's actual parent. ///
Note that to submit integrated stream files, the current client must ///
be dedicated to the target stream. (See 'p4 help client'.) ///
///
The -b flag makes 'p4 integrate' use a user-defined branch view. ///
(See 'p4 help branch'.) The source is the left side of the branch view ///
and the target is the right side. With -r, the direction is reversed. ///
///
The -s flag can be used with -b to cause fromFile to be treated as ///
the source, and both sides of the branch view to be treated as the ///
target, per the branch view mapping. Optional toFile arguments may ///
be given to further restrict the scope of the target file set. The ///
-r flag is ignored when -s is used. ///
///
Note that 'p4 integrate' automatically adusts source-to-target ///
mappings for moved and renamed files. (Adjustment occurs only if ///
the 'p4 move' command was used to move/rename files.) The scope of ///
source and target file sets must include both the old-named and the ///
new-named files for mappings to be adjusted. Moved source files may ///
cause target files to be scheduled for filename resolves. ///
///
The -f flag forces integrate to ignore integration history and treat ///
all source revisions as unintegrated. It is meant to be used with ///
revRange to force reintegration of specific, previously integrated ///
revisions. ///
///
The -i flag enables merging between files that have no prior ///
integration history. By default, 'p4 integrate' requires a prior ///
integration in order to identify a base for merging. The -i flag ///
allows the integration, and schedules the target file to be resolved ///
using the first source revision as the merge base. ///
///
The -o flag causes more merge information to be output. For each ///
target file scheduled to be resolved, the base file revision and the ///
source file revision are shown. (After running 'p4 integrate', the ///
same information is available from 'p4 resolve -o'.) ///
///
The -R flags modify the way resolves are scheduled: ///
///
-Rb Schedules 'branch resolves' instead of branching new ///
target files automatically. ///
///
-Rd Schedules 'delete resolves' instead of deleting ///
target files automatically. ///
///
-Rs Skips cherry-picked revisions already integrated. ///
This can improve merge results, but can also cause ///
multiple resolves per file to be scheduled. ///
///
The -D flags modify the way deleted files are treated: ///
///
-Dt If the target file has been deleted and the source ///
file has changed, re-branch the source file on top ///
of the target file instead of scheduling a resolve. ///
///
-Ds If the source file has been deleted and the target ///
file has changed, delete the target file instead of ///
scheduling a resolve. ///
///
-Di If the source file has been deleted and re-added, ///
probe revisions that precede the deletion to find ///
unintegrated revisions. By default, 'p4 integrate' ///
starts probing at the last re-added revision. ///
///
The -d flag is a shorthand for all -D flags used together. ///
///
The -h flag leaves the target files at the revision currently synced ///
to the client (the '#have' revision). By default, target files are ///
automatically synced to the head revision by 'p4 integrate'. ///
///
The -t flag propagates source filetypes instead of scheduling ///
filetype conflicts to be resolved. ///
///
The -m flag limits integration to the first 'max' number of files. ///
///
The -n flag displays a preview of integration, without actually ///
doing anything. ///
///
If -c changelist# is specified, the files are opened in the ///
designated numbered pending changelist instead of the 'default' ///
changelist. ///
///
The -v flag causes a 'virtual' integration that does not modify ///
client workspace files unless target files need to be resolved. ///
After submitting a virtual integration, 'p4 sync' can be used to ///
update the workspace. ///
///
///
public Options(IntegrateFilesCmdFlags flags, int changeList, int maxFiles, String branch, string stream, string parent) { if (changeList >= 0) { this["-c"] = changeList.ToString(); } if (((flags & IntegrateFilesCmdFlags.BranchIfTargetDeleted) != 0) && ((flags & IntegrateFilesCmdFlags.DeleteIfSourceDeleted) != 0) && ((flags & IntegrateFilesCmdFlags.IntegrateAllIfSourceDeleted) != 0)) { this["-d"] = null; } if ((flags & IntegrateFilesCmdFlags.Force) != 0) { this["-f"] = null; } if ((flags & IntegrateFilesCmdFlags.LeaveHaveVersion) != 0) { this["-h"] = null; } if ((flags & IntegrateFilesCmdFlags.IntegrateUnrelated) != 0) { this["-i"] = null; } if ((flags & IntegrateFilesCmdFlags.DisplayBaseFile) != 0) { this["-o"] = null; } if ((flags & IntegrateFilesCmdFlags.PreviewIntegrationsOnly) != 0) { this["-n"] = null; } if (maxFiles > 0) { this["-m"] = maxFiles.ToString(); } if ((flags & IntegrateFilesCmdFlags.PropogateType) != 0) { this["-t"] = null; } if ((flags & IntegrateFilesCmdFlags.DontCopyNewBranchFiles) != 0) { this["-v"] = null; } if (this.ContainsKey("-d") == false) { if ((flags & IntegrateFilesCmdFlags.BranchIfTargetDeleted) != 0) { this["-Dt"] = null; } if ((flags & IntegrateFilesCmdFlags.DeleteIfSourceDeleted) != 0) { this["-Ds"] = null; } if ((flags & IntegrateFilesCmdFlags.IntegrateAllIfSourceDeleted) != 0) { this["-Di"] = null; } } if ((flags & IntegrateFilesCmdFlags.BranchResolves) != 0) { this["-Rb"] = null; } if ((flags & IntegrateFilesCmdFlags.DeleteResolves) != 0) { this["-Rd"] = null; } if ((flags & IntegrateFilesCmdFlags.SkipRevisions) != 0) { this["-Rs"] = null; } if (String.IsNullOrEmpty(branch) == false) { this["-b"] = branch; } if (String.IsNullOrEmpty(stream) == false) { this["-S"] = stream; } if ((flags & IntegrateFilesCmdFlags.SwapSourceAndTarget) != 0) { this["-r"] = null; } if ((flags & IntegrateFilesCmdFlags.BidirectionalView) != 0) { this["-s"] = null; } } } /// /// Integrate command options /// public class IntegrateFilesCmdOptions : Options { /// /// Options for the integrate command. /// /// /// /// /// ///
p4 help integrate ///
///
integrate -- Integrate one set of files into another ///
///
p4 integrate [options] fromFile[revRange] toFile ///
p4 integrate [options] -b branch [-r] [toFile[revRange] ...] ///
p4 integrate [options] -b branch -s fromFile[revRange] [toFile ...] ///
p4 integrate [options] -S stream [-r] [-P parent] [file[revRange] ...] ///
///
options: -c changelist# -d -f -h -i -o -n -m max -t -v ///
-D<flags> -R<flags> ///
///
'p4 integrate' integrates one set of files (the 'source') into ///
another (the 'target'). ///
///
(See also 'p4 merge' and 'p4 copy', variants of 'p4 integrate' that ///
may be easier and more effective for the task at hand.) ///
///
Using the client workspace as a staging area, 'p4 integrate' adds and ///
deletes target files per changes in the source, and schedules all ///
other affected target files to be resolved. Target files outside of ///
the current client view are not affected. Source files need not be ///
within the client view. ///
///
'p4 resolve' must be used to merge file content, and to resolve ///
filename and filetype changes. 'p4 submit' commits integrated files ///
to the depot. Unresolved files may not be submitted. Integrations ///
can be shelved with 'p4 shelve' and abandoned with 'p4 revert'. The ///
commands 'p4 integrated' and 'p4 filelog' display integration history. ///
///
When 'p4 integrate' schedules a workspace file to be resolved, it ///
leaves it read-only. 'p4 resolve' can operate on a read-only file. ///
For other pre-submit changes, 'p4 edit' must be used to make the ///
file writable. ///
///
Source and target files can be specified either on the 'p4 integrate' ///
command line or through a branch view. On the command line, fromFile ///
is the source file set and toFile is the target file set. With a ///
branch view, one or more toFile arguments can be given to limit the ///
scope of the target file set. ///
///
revRange is a revision or a revision range that limits the span of ///
source history to be probed for unintegrated revisions. revRange ///
can be used on fromFile, or on toFile, but not on both. When used on ///
toFile, it refers to source revisions, not to target revisions. For ///
details about revision specifiers, see 'p4 help revisions'. ///
///
The -S flag makes 'p4 integrate' use a stream's branch view. (See ///
'p4 help stream'.) The source is the stream itself, and the target is ///
the stream's parent. With -r, the direction is reversed. -P can be ///
used to specify a parent stream other than the stream's actual parent. ///
Note that to submit integrated stream files, the current client must ///
be dedicated to the target stream. (See 'p4 help client'.) ///
///
The -b flag makes 'p4 integrate' use a user-defined branch view. ///
(See 'p4 help branch'.) The source is the left side of the branch view ///
and the target is the right side. With -r, the direction is reversed. ///
///
The -s flag can be used with -b to cause fromFile to be treated as ///
the source, and both sides of the branch view to be treated as the ///
target, per the branch view mapping. Optional toFile arguments may ///
be given to further restrict the scope of the target file set. The ///
-r flag is ignored when -s is used. ///
///
Note that 'p4 integrate' automatically adusts source-to-target ///
mappings for moved and renamed files. (Adjustment occurs only if ///
the 'p4 move' command was used to move/rename files.) The scope of ///
source and target file sets must include both the old-named and the ///
new-named files for mappings to be adjusted. Moved source files may ///
cause target files to be scheduled for filename resolves. ///
///
The -f flag forces integrate to ignore integration history and treat ///
all source revisions as unintegrated. It is meant to be used with ///
revRange to force reintegration of specific, previously integrated ///
revisions. ///
///
The -i flag enables merging between files that have no prior ///
integration history. By default, 'p4 integrate' requires a prior ///
integration in order to identify a base for merging. The -i flag ///
allows the integration, and schedules the target file to be resolved ///
using the first source revision as the merge base. ///
///
The -o flag causes more merge information to be output. For each ///
target file scheduled to be resolved, the base file revision and the ///
source file revision are shown. (After running 'p4 integrate', the ///
same information is available from 'p4 resolve -o'.) ///
///
The -R flags modify the way resolves are scheduled: ///
///
-Rb Schedules 'branch resolves' instead of branching new ///
target files automatically. ///
///
-Rd Schedules 'delete resolves' instead of deleting ///
target files automatically. ///
///
-Rs Skips cherry-picked revisions already integrated. ///
This can improve merge results, but can also cause ///
multiple resolves per file to be scheduled. ///
///
The -D flags modify the way deleted files are treated: ///
///
-Dt If the target file has been deleted and the source ///
file has changed, re-branch the source file on top ///
of the target file instead of scheduling a resolve. ///
///
-Ds If the source file has been deleted and the target ///
file has changed, delete the target file instead of ///
scheduling a resolve. ///
///
-Di If the source file has been deleted and re-added, ///
probe revisions that precede the deletion to find ///
unintegrated revisions. By default, 'p4 integrate' ///
starts probing at the last re-added revision. ///
///
The -d flag is a shorthand for all -D flags used together. ///
///
The -h flag leaves the target files at the revision currently synced ///
to the client (the '#have' revision). By default, target files are ///
automatically synced to the head revision by 'p4 integrate'. ///
///
The -t flag propagates source filetypes instead of scheduling ///
filetype conflicts to be resolved. ///
///
The -m flag limits integration to the first 'max' number of files. ///
///
The -n flag displays a preview of integration, without actually ///
doing anything. ///
///
If -c changelist# is specified, the files are opened in the ///
designated numbered pending changelist instead of the 'default' ///
changelist. ///
///
The -v flag causes a 'virtual' integration that does not modify ///
client workspace files unless target files need to be resolved. ///
After submitting a virtual integration, 'p4 sync' can be used to ///
update the workspace. ///
///
///
public IntegrateFilesCmdOptions(IntegrateFilesCmdFlags flags, int changeList, int maxFiles, String branch, string stream, string parent) : base(flags, changeList, maxFiles, branch, stream, parent) { } } /// /// Flags for the label sync command. /// [Flags] public enum LabelSyncCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -a flag adds the specified file to the label. /// AddFile = 0x0001, /// /// The -d deletes the specified file from the label, regardless of /// revision. /// DeleteFile = 0x0002, /// /// The -n flag previews the operation without altering the label. /// Preview = 0x0004, /// /// The -q flag suppresses normal output messages. Messages regarding /// errors or exceptional conditions are displayed. /// Quiet = 0x0008 }; public partial class Options { /// /// Options for the labelsync command. /// /// /// /// /// ///
p4 help labelsync ///
///
labelsync -- Apply the label to the contents of the client workspace ///
///
p4 labelsync [-a -d -n -q] -l label [file[revRange] ...] ///
///
Labelsync causes the specified label to reflect the current contents ///
of the client. It records the revision of each file currently synced. ///
The label's name can subsequently be used in a revision specification ///
as @label to refer to the revision of a file as stored in the label. ///
///
Without a file argument, labelsync causes the label to reflect the ///
contents of the whole client, by adding, deleting, and updating the ///
label. If a file is specified, labelsync updates the specified file. ///
///
If the file argument includes a revision specification, that revision ///
is used instead of the revision synced by the client. If the specified ///
revision is a deleted revision, the label includes that deleted ///
revision. See 'p4 help revisions' for details about specifying ///
revisions. ///
///
If the file argument includes a revision range specification, ///
only files selected by the revision range are updated, and the ///
highest revision in the range is used. ///
///
The -a flag adds the specified file to the label. ///
///
The -d deletes the specified file from the label, regardless of ///
revision. ///
///
The -n flag previews the operation without altering the label. ///
///
Only the owner of a label can run labelsync on that label. A label ///
that has its Options: field set to 'locked' cannot be updated. ///
///
The -q flag suppresses normal output messages. Messages regarding ///
errors or exceptional conditions are displayed. ///
///
///
public Options(LabelSyncCmdFlags flags) { Options value = new Options(); if ((flags & LabelSyncCmdFlags.AddFile) != 0) { this["-a"] = null; } if ((flags & LabelSyncCmdFlags.DeleteFile) != 0) { this["-d"] = null; } if ((flags & LabelSyncCmdFlags.Preview) != 0) { this["-p"] = null; } if ((flags & LabelSyncCmdFlags.Quiet) != 0) { this["-q"] = null; } } } /// /// Labelsync command options /// public class LabelSyncCmdOptions : Options { /// /// Options for the labelsync command. /// /// /// /// /// ///
p4 help labelsync ///
///
labelsync -- Apply the label to the contents of the client workspace ///
///
p4 labelsync [-a -d -n -q] -l label [file[revRange] ...] ///
///
Labelsync causes the specified label to reflect the current contents ///
of the client. It records the revision of each file currently synced. ///
The label's name can subsequently be used in a revision specification ///
as @label to refer to the revision of a file as stored in the label. ///
///
Without a file argument, labelsync causes the label to reflect the ///
contents of the whole client, by adding, deleting, and updating the ///
label. If a file is specified, labelsync updates the specified file. ///
///
If the file argument includes a revision specification, that revision ///
is used instead of the revision synced by the client. If the specified ///
revision is a deleted revision, the label includes that deleted ///
revision. See 'p4 help revisions' for details about specifying ///
revisions. ///
///
If the file argument includes a revision range specification, ///
only files selected by the revision range are updated, and the ///
highest revision in the range is used. ///
///
The -a flag adds the specified file to the label. ///
///
The -d deletes the specified file from the label, regardless of ///
revision. ///
///
The -n flag previews the operation without altering the label. ///
///
Only the owner of a label can run labelsync on that label. A label ///
that has its Options: field set to 'locked' cannot be updated. ///
///
The -q flag suppresses normal output messages. Messages regarding ///
errors or exceptional conditions are displayed. ///
///
///
public LabelSyncCmdOptions(LabelSyncCmdFlags flags) : base(flags) { } } public partial class Options { /// /// Options for the lock command. /// /// /// /// ///
p4 help lock ///
///
lock -- Lock an open file to prevent it from being submitted ///
///
p4 lock [-c changelist#] [file ...] ///
///
The specified files are locked in the depot, preventing any user ///
other than the current user on the current client from submitting ///
changes to the files. If a file is already locked, the lock request ///
is rejected. If no file names are specified, all files in the ///
specified changelist are locked. If changelist number is omitted, ///
files in the default changelist are locked. ///
///
///
public Options(int changeList) { if (changeList >= 0) { this["-c"] = changeList.ToString(); } } } /// /// Lock command options /// public class LockCmdOptions : Options { /// /// Options for the lock command. /// /// /// /// ///
p4 help lock ///
///
lock -- Lock an open file to prevent it from being submitted ///
///
p4 lock [-c changelist#] [file ...] ///
///
The specified files are locked in the depot, preventing any user ///
other than the current user on the current client from submitting ///
changes to the files. If a file is already locked, the lock request ///
is rejected. If no file names are specified, all files in the ///
specified changelist are locked. If changelist number is omitted, ///
files in the default changelist are locked. ///
///
///
public LockCmdOptions(int changeList) : base(changeList) { } } /// /// Flags for the move command. /// [Flags] public enum MoveFileCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -f flag forces a move to an existing target file. The file /// must be synced and not opened. The originating source file will /// no longer be synced to the client. /// Force = 0x0001, /// /// The -n flag previews the operation without moving files. /// Preview = 0x0002, /// /// The -k flag performs the rename on the server without modifying /// client files. Use with caution, as an incorrect move can cause /// discrepancies between the state of the client and the corresponding /// server metadata. /// ServerOnly = 0x0004, }; public partial class Options { /// /// Options for the move command. /// /// /// /// /// /// ///
p4 help move ///
///
move -- move file(s) from one location to another ///
rename -- synonym for 'move' ///
///
p4 move [-c changelist#] [-f -n -k] [-t filetype] fromFile toFile ///
///
Move takes an already opened file and moves it from one client ///
location to another, reopening it as a pending depot move. When ///
the file is submitted with 'p4 submit', its depot file is moved ///
accordingly. ///
///
Wildcards in fromFile and toFile must match. The fromFile must be ///
a file open for add or edit. ///
///
'p4 opened' lists pending moves. 'p4 diff' can compare a moved ///
client file with its depot original, 'p4 sync' can schedule an ///
update of a moved file, and 'p4 resolve' can resolve the update. ///
///
A client file can be moved many times before it is submitted. ///
Moving a file back to its original location will undo a pending ///
move, leaving unsubmitted content intact. Using 'p4 revert' ///
undoes the move and reverts the unsubmitted content. ///
///
If -c changelist# is specified, the file is reopened in the ///
specified pending changelist as well as being moved. ///
///
The -f flag forces a move to an existing target file. The file ///
must be synced and not opened. The originating source file will ///
no longer be synced to the client. ///
///
If -t filetype is specified, the file is assigned that filetype. ///
If the filetype is a partial filetype, the partial filetype is ///
combined with the current filetype. See 'p4 help filetypes'. ///
///
The -n flag previews the operation without moving files. ///
///
The -k flag performs the rename on the server without modifying ///
client files. Use with caution, as an incorrect move can cause ///
discrepancies between the state of the client and the corresponding ///
server metadata. ///
///
The 'move' command requires a release 2009.1 or newer client. The ///
'-f' flag requires a 2010.1 client. ///
///
///
public Options(MoveFileCmdFlags flags, int changeList, FileType fileType) { if (changeList >= 0) { this["-c"] = changeList.ToString(); } if ((flags & MoveFileCmdFlags.Force) != 0) { this["-f"] = null; } if ((flags & MoveFileCmdFlags.Preview) != 0) { this["-n"] = null; } if ((flags & MoveFileCmdFlags.ServerOnly) != 0) { this["-k"] = null; } if (fileType != null) { this["-t"] = fileType.ToString(); } } } /// /// Move command options /// public class MoveCmdOptions : Options { /// /// Options for the move command. /// /// /// /// /// /// ///
p4 help move ///
///
move -- move file(s) from one location to another ///
rename -- synonym for 'move' ///
///
p4 move [-c changelist#] [-f -n -k] [-t filetype] fromFile toFile ///
///
Move takes an already opened file and moves it from one client ///
location to another, reopening it as a pending depot move. When ///
the file is submitted with 'p4 submit', its depot file is moved ///
accordingly. ///
///
Wildcards in fromFile and toFile must match. The fromFile must be ///
a file open for add or edit. ///
///
'p4 opened' lists pending moves. 'p4 diff' can compare a moved ///
client file with its depot original, 'p4 sync' can schedule an ///
update of a moved file, and 'p4 resolve' can resolve the update. ///
///
A client file can be moved many times before it is submitted. ///
Moving a file back to its original location will undo a pending ///
move, leaving unsubmitted content intact. Using 'p4 revert' ///
undoes the move and reverts the unsubmitted content. ///
///
If -c changelist# is specified, the file is reopened in the ///
specified pending changelist as well as being moved. ///
///
The -f flag forces a move to an existing target file. The file ///
must be synced and not opened. The originating source file will ///
no longer be synced to the client. ///
///
If -t filetype is specified, the file is assigned that filetype. ///
If the filetype is a partial filetype, the partial filetype is ///
combined with the current filetype. See 'p4 help filetypes'. ///
///
The -n flag previews the operation without moving files. ///
///
The -k flag performs the rename on the server without modifying ///
client files. Use with caution, as an incorrect move can cause ///
discrepancies between the state of the client and the corresponding ///
server metadata. ///
///
The 'move' command requires a release 2009.1 or newer client. The ///
'-f' flag requires a 2010.1 client. ///
///
///
public MoveCmdOptions(MoveFileCmdFlags flags, int changeList, FileType fileType) : base(flags, changeList, fileType) { } } public partial class Options { /// /// Options for the reopen command. /// /// /// /// /// ///
p4 help reopen ///
///
reopen -- Change the filetype of an open file or move it to ///
another changelist ///
///
p4 reopen [-c changelist#] [-t filetype] file ... ///
///
Reopen an open file for the current user in order to move it to a ///
different changelist or change its filetype. ///
///
The target changelist must exist; you cannot create a changelist by ///
reopening a file. To move a file to the default changelist, use ///
'p4 reopen -c default'. ///
///
If -t filetype is specified, the file is assigned that filetype. If ///
a partial filetype is specified, it is combined with the current ///
filetype. For details, see 'p4 help filetypes'. ///
///
///
public Options(int changeList, FileType fileType) { if (changeList > 0) { this["-c"] = changeList.ToString(); } else if (changeList == 0) { this["-c"] = "default"; } if (fileType != null) { this["-t"] = fileType.ToString(); } } } /// /// Options for the reopen command. /// public class ReopenCmdOptions : Options { /// /// Options for the reopen command. /// /// /// /// /// ///
p4 help reopen ///
///
reopen -- Change the filetype of an open file or move it to ///
another changelist ///
///
p4 reopen [-c changelist#] [-t filetype] file ... ///
///
Reopen an open file for the current user in order to move it to a ///
different changelist or change its filetype. ///
///
The target changelist must exist; you cannot create a changelist by ///
reopening a file. To move a file to the default changelist, use ///
'p4 reopen -c default'. ///
///
If -t filetype is specified, the file is assigned that filetype. If ///
a partial filetype is specified, it is combined with the current ///
filetype. For details, see 'p4 help filetypes'. ///
///
///
public ReopenCmdOptions(int changeList, FileType fileType) : base(changeList, fileType) { } } /// /// Flags for the resolve command. /// [Flags] public enum ResolveFilesCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -A flag can be used to limit the kind of resolving that will be /// attempted; without it, everything is attempted: /// /// -Aa Resolve attributes. /// FileAttributesOnly = 0x0001, /// /// The -A flag can be used to limit the kind of resolving that will be /// attempted; without it, everything is attempted: /// -Ab Resolve file branching. /// FileBranchingOnly = 0x0002, /// /// The -A flag can be used to limit the kind of resolving that will be /// attempted; without it, everything is attempted: /// -Ac Resolve file content changes. /// FileContentChangesOnly = 0x0004, /// /// The -A flag can be used to limit the kind of resolving that will be /// attempted; without it, everything is attempted: /// -Ad Resolve file deletions. /// FileDeletionsOnly = 0x0008, /// /// The -A flag can be used to limit the kind of resolving that will be /// attempted; without it, everything is attempted: /// -Am Resolve moved and renamed files. /// FileMovesOnly = 0x0010, /// /// The -A flag can be used to limit the kind of resolving that will be /// attempted; without it, everything is attempted: /// -At Resolve filetype changes. /// FileTypeChangesOnly = 0x0020, AFlags = FileAttributesOnly | FileBranchingOnly | FileContentChangesOnly | FileDeletionsOnly | FileMovesOnly | FileTypeChangesOnly, /// /// The -a flag puts 'p4 resolve' into automatic mode. The user is not /// prompted, and files that can't be resolved automatically are skipped: /// -as 'Safe' resolve; skip files that need merging. /// The -as flag causes the workspace file to be replaced with their file /// only if theirs has changed and yours has not. /// AutomaticSafeMode = 0x0100, /// /// The -a flag puts 'p4 resolve' into automatic mode. The user is not /// prompted, and files that can't be resolved automatically are skipped: /// -am Resolve by merging; skip files with conflicts. /// The -am flag causes the workspace file to be replaced with the result /// of merging theirs with yours. If the merge detected conflicts, the /// file is left untouched and unresolved. /// AutomaticMergeMode = 0x0200, /// /// The -a flag puts 'p4 resolve' into automatic mode. The user is not /// prompted, and files that can't be resolved automatically are skipped: /// -af Force acceptance of merged files with conflicts. /// The -af flag causes the workspace file to be replaced with the result /// of merging theirs with yours, even if there were conflicts. This can /// leave conflict markers in workspace files. /// AutomaticForceMergeMode = 0x0400, /// /// The -a flag puts 'p4 resolve' into automatic mode. The user is not /// prompted, and files that can't be resolved automatically are skipped: /// -at Force acceptance of theirs; overwrites yours. /// The -at flag resolves all files by copying theirs into yours. It /// should be used with care, as it overwrites any changes made to the /// file in the client workspace. /// AutomaticTheirsMode = 0x0800, /// /// The -a flag puts 'p4 resolve' into automatic mode. The user is not /// prompted, and files that can't be resolved automatically are skipped: /// -ay Force acceptance of yours; ignores theirs. /// The -ay flag resolves all files by accepting yours and ignoring /// theirs. It preserves the content of workspace files. /// AutomaticYoursMode = 0x2000, aFlags = AutomaticSafeMode | AutomaticMergeMode | AutomaticForceMergeMode | AutomaticTheirsMode | AutomaticYoursMode, /// /// The -f flag enables previously resolved files to be resolved again. /// By default, after files have been resolved, 'p4 resolve' does not /// process them again. /// ForceResolve = 0x04000, /// /// The -n flag previews the operation without altering files. /// PreviewOnly = 0x08000, /// /// The -N flag previews the operation with additional information about /// any non-content resolve actions that are scheduled. /// PreviewPlusOnly = 0x10000, /// /// The -o flag displays the base file name and revision to be used /// during the the merge. /// DisplayBaseFile = 0x20000, /// /// The -t flag forces 'p4 resolve' to attempt a textual merge, even for /// files with non-text (binary) types. /// ForceTextualMerge = 0x40000, /// /// The -v flag causes 'p4 resolve' to insert markers for all changes, /// not just conflicts. /// MarkAllChanges = 0x80000, /// /// The -d flags can be used to control handling of whitespace and line /// endings when merging files: /// -db Ignore Whitespace Changes /// IgnoreWhitespaceChanges = 0x100000, /// /// The -d flags can be used to control handling of whitespace and line /// endings when merging files: /// -dw Ingore whitespace altogether. /// IgnoreWhitespace = 0x200000, /// /// The -d flags can be used to control handling of whitespace and line /// endings when merging files: /// -dl Ignore Line Endings /// IgnoreLineEndings = 0x400000, WsFlags = IgnoreWhitespaceChanges | IgnoreWhitespace | IgnoreLineEndings } /// /// Options for the resolve command /// public partial class Options { /// /// Options for the resolve command /// /// /// /// ///
p4 help resolve ///
///
resolve -- Resolve integrations and updates to workspace files ///
///
p4 resolve [options] [file ...] ///
///
options: -A<flags> -a<flags> -d<flags> -f -n -N -o -t -v ///
-c changelist# ///
///
'p4 resolve' resolves changes to files in the client workspace. ///
///
'p4 resolve' works only on files that have been scheduled to be ///
resolved. The commands that can schedule resolves are: 'p4 sync', ///
'p4 update', 'p4 submit', 'p4 merge', and 'p4 integrate'. Files must ///
be resolved before they can be submitted. ///
///
Resolving involves two sets of files, a source and a target. The ///
target is a set of depot files that maps to opened files in the ///
client workspace. When resolving an integration, the source is a ///
different set of depot files than the target. When resolving an ///
update, the source is the same set of depot files as the target, ///
at a different revision. ///
///
The 'p4 resolve' file argument specifies the target. If the file ///
argument is omitted, all unresolved files are resolved. ///
///
Resolving can modify workspace files. To back up files, use 'p4 ///
shelve' before using 'p4 resolve'. ///
///
The resolve process is a classic three-way merge. The participating ///
files are referred to as follows: ///
///
'yours' The target file open in the client workspace ///
'theirs' The source file in the depot ///
'base' The common ancestor; the highest revision of the ///
source file already accounted for in the target. ///
'merged' The merged result. ///
///
Filenames, filetypes, and text file content can be resolved by ///
accepting 'yours', 'theirs', or 'merged'. Branching, deletion, and ///
binary file content can be resolved by accepting either 'yours' or ///
'theirs'. ///
///
When resolving integrated changes, 'p4 resolve' distinguishes among ///
four results: entirely yours, entirely theirs, a pure merge, or an ///
edited merge. The distinction is recorded when resolved files are ///
submitted, and will be used by future commands to determine whether ///
integration is needed. ///
///
In all cases, accepting 'yours' leaves the target file in its current ///
state. The result of accepting 'theirs' is as follows: ///
///
Content: The target file content is overwritten. ///
Branching: A new target is branched. ///
Deletion: The target file is deleted. ///
Filename: The target file is moved or renamed. ///
Filetype: The target file's type is changed. ///
///
For each unresolved change, the user is prompted to accept a result. ///
Content and non-content changes are resolved separately. For content, ///
'p4 resolve' places the merged result into a temporary file in the ///
client workspace. If there are any conflicts, the merged file contains ///
conflict markers that must be removed by the user. ///
///
'p4 resolve' displays a count of text diffs and conflicts, and offers ///
the following prompts: ///
///
Accept: ///
at Keep only changes to their file. ///
ay Keep only changes to your file. ///
* am Keep merged file. ///
* ae Keep merged and edited file. ///
* a Keep autoselected file. ///
///
Diff: ///
* dt See their changes alone. ///
* dy See your changes alone. ///
* dm See merged changes. ///
d Diff your file against merged file. ///
///
Edit: ///
et Edit their file (read only). ///
ey Edit your file (read/write). ///
* e Edit merged file (read/write). ///
///
Misc: ///
* m Run '$P4MERGE base theirs yours merged'. ///
(Runs '$P4MERGEUNICODE charset base theirs ///
yours merged' if set and the file is a ///
unicode file.) ///
s Skip this file. ///
h Print this help message. ///
^C Quit the resolve operation. ///
///
Options marked (*) appear only for text files. The suggested action ///
will be displayed in brackets. ///
///
The 'merge' (m) option enables you to invoke your own merge program, if ///
one is configured using the $P4MERGE environment variable. Four files ///
are passed to the program: the base, yours, theirs, and the temporary ///
file. The program is expected to write merge results to the temporary ///
file. ///
///
The -A flag can be used to limit the kind of resolving that will be ///
attempted; without it, everything is attempted: ///
///
-Ab Resolve file branching. ///
-Ac Resolve file content changes. ///
-Ad Resolve file deletions. ///
-Am Resolve moved and renamed files. ///
-At Resolve filetype changes. ///
///
The -a flag puts 'p4 resolve' into automatic mode. The user is not ///
prompted, and files that can't be resolved automatically are skipped: ///
///
-as 'Safe' resolve; skip files that need merging. ///
-am Resolve by merging; skip files with conflicts. ///
-af Force acceptance of merged files with conflicts. ///
-at Force acceptance of theirs; overwrites yours. ///
-ay Force acceptance of yours; ignores theirs. ///
///
The -as flag causes the workspace file to be replaced with their file ///
only if theirs has changed and yours has not. ///
///
The -am flag causes the workspace file to be replaced with the result ///
of merging theirs with yours. If the merge detected conflicts, the ///
file is left untouched and uresolved. ///
///
The -af flag causes the workspace file to be replaced with the result ///
of merging theirs with yours, even if there were conflicts. This can ///
leave conflict markers in workspace files. ///
///
The -at flag resolves all files by copying theirs into yours. It ///
should be used with care, as it overwrites any changes made to the ///
file in the client workspace. ///
///
The -ay flag resolves all files by accepting yours and ignoring ///
theirs. It preserves the content of workspace files. ///
///
The -d flags can be used to control handling of whitespace and line ///
endings when merging files: ///
///
-db Ingore whitespace changes. ///
-dw Ingore whitespace altogether. ///
-dl Ignores line endings. ///
///
The -d flags are also passed to the diff options in the 'p4 resolve' ///
dialog. Additional -d flags that modify the diff output but do not ///
modify merge behavior include -dn (RCS), -dc (context), -ds (summary), ///
and -du (unified). Note that 'p4 resolve' uses text from the client ///
file if the files differ only in whitespace. ///
///
The -f flag enables previously resolved content to be resolved again. ///
By default, after files have been resolved, 'p4 resolve' does not ///
process them again. ///
///
The -n flag previews the operation without altering files. ///
///
The -N flag previews the operation with additional information about ///
any non-content resolve actions that are scheduled. ///
///
The -o flag displays the base file name and revision to be used ///
during the the merge. ///
///
The -t flag forces 'p4 resolve' to attempt a textual merge, even for ///
files with non-text (binary) types. ///
///
The -v flag causes 'p4 resolve' to insert markers for all changes, ///
not just conflicts. ///
///
The -c flag limits 'p4 resolve' to the files in changelist#. ///
///
///
public Options(ResolveFilesCmdFlags flags, int changeList) { if ((flags & ResolveFilesCmdFlags.AFlags) != 0) { // these can be combined string flag = "-A"; if ((flags & ResolveFilesCmdFlags.FileAttributesOnly) != 0) flag += "a"; if ((flags & ResolveFilesCmdFlags.FileBranchingOnly) != 0) flag += "b"; if ((flags & ResolveFilesCmdFlags.FileContentChangesOnly) != 0) flag += "c"; if ((flags & ResolveFilesCmdFlags.FileDeletionsOnly) != 0) flag += "d"; if ((flags & ResolveFilesCmdFlags.FileMovesOnly) != 0) flag += "m"; if ((flags & ResolveFilesCmdFlags.FileTypeChangesOnly) != 0) flag += "t"; this[flag] = null; } if ((flags & ResolveFilesCmdFlags.aFlags) != 0) { // these are mutually exclusive string flag = "-a"; if ((flags & ResolveFilesCmdFlags.AutomaticSafeMode) != 0) flag = "-as"; else if ((flags & ResolveFilesCmdFlags.AutomaticMergeMode) != 0) flag = "-am"; else if ((flags & ResolveFilesCmdFlags.AutomaticForceMergeMode) != 0) flag = "-af"; else if ((flags & ResolveFilesCmdFlags.AutomaticTheirsMode) != 0) flag = "-at"; else if ((flags & ResolveFilesCmdFlags.AutomaticYoursMode) != 0) flag = "-ay"; this[flag] = null; } if ((flags & ResolveFilesCmdFlags.WsFlags) != 0) { // these are mutually exclusive string flag = "-d"; if ((flags & ResolveFilesCmdFlags.IgnoreWhitespaceChanges) != 0) flag = "-db"; else if ((flags & ResolveFilesCmdFlags.IgnoreWhitespace) != 0) flag = "-dw"; else if ((flags & ResolveFilesCmdFlags.IgnoreLineEndings) != 0) flag = "-dl"; this[flag] = null; } if ((flags & ResolveFilesCmdFlags.ForceResolve) != 0) { this["-f"] = null; } if ((flags & ResolveFilesCmdFlags.PreviewOnly) != 0) { this["-n"] = null; } if ((flags & ResolveFilesCmdFlags.PreviewPlusOnly) != 0) { this["-N"] = null; } if ((flags & ResolveFilesCmdFlags.DisplayBaseFile) != 0) { this["-o"] = null; } if ((flags & ResolveFilesCmdFlags.ForceTextualMerge) != 0) { this["-t"] = null; } if ((flags & ResolveFilesCmdFlags.MarkAllChanges) != 0) { this["-v"] = null; } if (changeList >= 0) { this["-c"] = changeList.ToString(); } } } /// /// Options for the resolve command. /// public class ResolveCmdOptions : Options { /// /// Options for the resolve command. /// /// /// /// /// ///
p4 help resolve ///
///
resolve -- Resolve integrations and updates to workspace files ///
///
p4 resolve [options] [file ...] ///
///
options: -A<flags> -a<flags> -d<flags> -f -n -N -o -t -v ///
-c changelist# ///
///
'p4 resolve' resolves changes to files in the client workspace. ///
///
'p4 resolve' works only on files that have been scheduled to be ///
resolved. The commands that can schedule resolves are: 'p4 sync', ///
'p4 update', 'p4 submit', 'p4 merge', and 'p4 integrate'. Files must ///
be resolved before they can be submitted. ///
///
Resolving involves two sets of files, a source and a target. The ///
target is a set of depot files that maps to opened files in the ///
client workspace. When resolving an integration, the source is a ///
different set of depot files than the target. When resolving an ///
update, the source is the same set of depot files as the target, ///
at a different revision. ///
///
The 'p4 resolve' file argument specifies the target. If the file ///
argument is omitted, all unresolved files are resolved. ///
///
Resolving can modify workspace files. To back up files, use 'p4 ///
shelve' before using 'p4 resolve'. ///
///
The resolve process is a classic three-way merge. The participating ///
files are referred to as follows: ///
///
'yours' The target file open in the client workspace ///
'theirs' The source file in the depot ///
'base' The common ancestor; the highest revision of the ///
source file already accounted for in the target. ///
'merged' The merged result. ///
///
Filenames, filetypes, and text file content can be resolved by ///
accepting 'yours', 'theirs', or 'merged'. Branching, deletion, and ///
binary file content can be resolved by accepting either 'yours' or ///
'theirs'. ///
///
When resolving integrated changes, 'p4 resolve' distinguishes among ///
four results: entirely yours, entirely theirs, a pure merge, or an ///
edited merge. The distinction is recorded when resolved files are ///
submitted, and will be used by future commands to determine whether ///
integration is needed. ///
///
In all cases, accepting 'yours' leaves the target file in its current ///
state. The result of accepting 'theirs' is as follows: ///
///
Content: The target file content is overwritten. ///
Branching: A new target is branched. ///
Deletion: The target file is deleted. ///
Filename: The target file is moved or renamed. ///
Filetype: The target file's type is changed. ///
///
For each unresolved change, the user is prompted to accept a result. ///
Content and non-content changes are resolved separately. For content, ///
'p4 resolve' places the merged result into a temporary file in the ///
client workspace. If there are any conflicts, the merged file contains ///
conflict markers that must be removed by the user. ///
///
'p4 resolve' displays a count of text diffs and conflicts, and offers ///
the following prompts: ///
///
Accept: ///
at Keep only changes to their file. ///
ay Keep only changes to your file. ///
* am Keep merged file. ///
* ae Keep merged and edited file. ///
* a Keep autoselected file. ///
///
Diff: ///
* dt See their changes alone. ///
* dy See your changes alone. ///
* dm See merged changes. ///
d Diff your file against merged file. ///
///
Edit: ///
et Edit their file (read only). ///
ey Edit your file (read/write). ///
* e Edit merged file (read/write). ///
///
Misc: ///
* m Run '$P4MERGE base theirs yours merged'. ///
(Runs '$P4MERGEUNICODE charset base theirs ///
yours merged' if set and the file is a ///
unicode file.) ///
s Skip this file. ///
h Print this help message. ///
^C Quit the resolve operation. ///
///
Options marked (*) appear only for text files. The suggested action ///
will be displayed in brackets. ///
///
The 'merge' (m) option enables you to invoke your own merge program, if ///
one is configured using the $P4MERGE environment variable. Four files ///
are passed to the program: the base, yours, theirs, and the temporary ///
file. The program is expected to write merge results to the temporary ///
file. ///
///
The -A flag can be used to limit the kind of resolving that will be ///
attempted; without it, everything is attempted: ///
///
-Ab Resolve file branching. ///
-Ac Resolve file content changes. ///
-Ad Resolve file deletions. ///
-Am Resolve moved and renamed files. ///
-At Resolve filetype changes. ///
///
The -a flag puts 'p4 resolve' into automatic mode. The user is not ///
prompted, and files that can't be resolved automatically are skipped: ///
///
-as 'Safe' resolve; skip files that need merging. ///
-am Resolve by merging; skip files with conflicts. ///
-af Force acceptance of merged files with conflicts. ///
-at Force acceptance of theirs; overwrites yours. ///
-ay Force acceptance of yours; ignores theirs. ///
///
The -as flag causes the workspace file to be replaced with their file ///
only if theirs has changed and yours has not. ///
///
The -am flag causes the workspace file to be replaced with the result ///
of merging theirs with yours. If the merge detected conflicts, the ///
file is left untouched and uresolved. ///
///
The -af flag causes the workspace file to be replaced with the result ///
of merging theirs with yours, even if there were conflicts. This can ///
leave conflict markers in workspace files. ///
///
The -at flag resolves all files by copying theirs into yours. It ///
should be used with care, as it overwrites any changes made to the ///
file in the client workspace. ///
///
The -ay flag resolves all files by accepting yours and ignoring ///
theirs. It preserves the content of workspace files. ///
///
The -d flags can be used to control handling of whitespace and line ///
endings when merging files: ///
///
-db Ingore whitespace changes. ///
-dw Ingore whitespace altogether. ///
-dl Ignores line endings. ///
///
The -d flags are also passed to the diff options in the 'p4 resolve' ///
dialog. Additional -d flags that modify the diff output but do not ///
modify merge behavior include -dn (RCS), -dc (context), -ds (summary), ///
and -du (unified). Note that 'p4 resolve' uses text from the client ///
file if the files differ only in whitespace. ///
///
The -f flag enables previously resolved content to be resolved again. ///
By default, after files have been resolved, 'p4 resolve' does not ///
process them again. ///
///
The -n flag previews the operation without altering files. ///
///
The -N flag previews the operation with additional information about ///
any non-content resolve actions that are scheduled. ///
///
The -o flag displays the base file name and revision to be used ///
during the the merge. ///
///
The -t flag forces 'p4 resolve' to attempt a textual merge, even for ///
files with non-text (binary) types. ///
///
The -v flag causes 'p4 resolve' to insert markers for all changes, ///
not just conflicts. ///
///
The -c flag limits 'p4 resolve' to the files in changelist#. ///
///
///
public ResolveCmdOptions(ResolveFilesCmdFlags flags, int changeList) : base(flags, changeList) { } } /// /// Diff whitespace options flags. /// [Flags] public enum DiffWhiteSpaceOptions { /// /// None /// none = 0x0000, /// /// -db Ignore Whitespace Changes /// IgnoreWhitespaceChanges = 0x0001, /// /// -dw Ingore whitespace altogether. /// IgnoreWhitespace = 0x0002, /// /// -dl Ignore Line Endings /// IgnoreLineEndings = 0x0004, /// /// -dn RCS /// RCS = 0x0008, /// /// -dc[n] Show context of changes /// ShowContext = 0x0010, /// /// -ds Summary /// ShowSummary = 0x0020, /// /// -du[n] Unified /// ShowUnified = 0x0040 }; /// /// Flags for the submit command. /// [Flags] public enum SubmitFilesCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -r flag reopens submitted files in the default changelist after /// submission. /// ReopenFiles = 0x0001, /// /// The -s flag extends the list of jobs to include the fix status /// for each job, which becomes the job's status when the changelist /// is committed. See 'p4 help change' for details. /// submission. /// IncludeJobs = 0x0002, /// /// The -e flag submits a shelved changelist without transferring files /// or modifying the workspace. The shelved change must be owned by /// the person submitting the change, but the client may be different. /// However, files shelved to a stream target may only be submitted by /// a stream client that is mapped to the target stream. In addition, /// files shelved to a non-stream target cannot be submitted by a /// stream client. Submitting shelved changes by a task stream /// client is not supported. To submit a shelved change, all /// files in the shelved change must be up to date and resolved. No /// files may be open in any workspace at the same change number. /// Client submit options (ie revertUnchanged, etc) will be ignored. /// If the submit is successful, the shelved change and files /// are cleaned up, and are no longer available to be unshelved or /// submitted. /// SubmitShelved = 0x0004 } public partial class Options { /// /// Submit command options /// /// /// /// /// /// /// /// ///
p4 help submit ///
///
submit -- Submit open files to the depot ///
///
p4 submit [-r -s -f option] ///
p4 submit [-r -s -f option] file ///
p4 submit [-r -f option] -d description ///
p4 submit [-r -f option] -d description file ///
p4 submit [-r -f option] -c changelist# ///
p4 submit -i [-r -s -f option] ///
///
'p4 submit' commits a pending changelist and its files to the depot. ///
///
By default, 'p4 submit' attempts to submit all files in the 'default' ///
changelist. Submit displays a dialog where you enter a description ///
of the change and, optionally, delete files from the list of files ///
to be checked in. ///
///
To add files to a changelist before submitting, use any of the ///
commands that open client workspace files: 'p4 add', 'p4 edit', ///
etc. ///
///
If the file parameter is specified, only files in the default ///
changelist that match the pattern are submitted. ///
///
Files in a stream path can be submitted only by client workspaces ///
dedicated to the stream. See 'p4 help client'. ///
///
Before committing a changelist, 'p4 submit' locks all the files being ///
submitted. If any file cannot be locked or submitted, the files are ///
left open in a numbered pending changelist. 'p4 opened' shows ///
unsubmitted files and their changelists. ///
///
Submit is atomic: if the operation succeeds, all files are updated ///
in the depot. If the submit fails, no depot files are updated. ///
///
The -c flag submits the specified pending changelist instead of the ///
default changelist. Additional changelists can be created manually, ///
using the 'p4 change' command, or automatically as the result of a ///
failed attempt to submit the default changelist. ///
///
The -d flag passes a description into the specified changelist rather ///
than displaying the changelist dialog for manual editing. This option ///
is useful for scripting, but does not allow you to add jobs or modify ///
the default changelist. ///
///
The -f flag enables you to override submit options that are configured ///
for the client that is submitting the changelist. This flag overrides ///
the -r (reopen)flag, if it is specified. See 'p4 help client' for ///
details about submit options. ///
///
The -i flag reads a changelist specification from the standard input. ///
The user's editor is not invoked. ///
///
The -r flag reopens submitted files in the default changelist after ///
submission. ///
///
The -s flag extends the list of jobs to include the fix status ///
for each job, which becomes the job's status when the changelist ///
is committed. See 'p4 help change' for details. ///
///
///
public Options(SubmitFilesCmdFlags flags, int changelist, Changelist newChangelist, string description, ClientSubmitOptions submitOptions) { if (newChangelist != null) this["-i"] = newChangelist.ToString(); if ((flags & SubmitFilesCmdFlags.ReopenFiles) != 0) { this["-r"] = null; } if ((flags & SubmitFilesCmdFlags.IncludeJobs) != 0) { this["-s"] = null; } if (submitOptions != null) { this["-f"] = submitOptions.ToString(); } if (String.IsNullOrEmpty(description) == false) { this["-d"] = description; } if (changelist > 0) { this["-c"] = changelist.ToString(); } if ((flags&SubmitFilesCmdFlags.SubmitShelved)!=0) { this.Clear(); // -e cannot be used with any other flags this["-e"] = changelist.ToString(); } } } /// /// Submit command options /// public class SubmitCmdOptions : Options { /// /// Submit command options /// /// /// /// /// /// /// /// ///
p4 help submit ///
///
submit -- Submit open files to the depot ///
///
p4 submit [-r -s -f option] ///
p4 submit [-r -s -f option] file ///
p4 submit [-r -f option] -d description ///
p4 submit [-r -f option] -d description file ///
p4 submit [-r -f option] -c changelist# ///
p4 submit -i [-r -s -f option] ///
///
'p4 submit' commits a pending changelist and its files to the depot. ///
///
By default, 'p4 submit' attempts to submit all files in the 'default' ///
changelist. Submit displays a dialog where you enter a description ///
of the change and, optionally, delete files from the list of files ///
to be checked in. ///
///
To add files to a changelist before submitting, use any of the ///
commands that open client workspace files: 'p4 add', 'p4 edit', ///
etc. ///
///
If the file parameter is specified, only files in the default ///
changelist that match the pattern are submitted. ///
///
Files in a stream path can be submitted only by client workspaces ///
dedicated to the stream. See 'p4 help client'. ///
///
Before committing a changelist, 'p4 submit' locks all the files being ///
submitted. If any file cannot be locked or submitted, the files are ///
left open in a numbered pending changelist. 'p4 opened' shows ///
unsubmitted files and their changelists. ///
///
Submit is atomic: if the operation succeeds, all files are updated ///
in the depot. If the submit fails, no depot files are updated. ///
///
The -c flag submits the specified pending changelist instead of the ///
default changelist. Additional changelists can be created manually, ///
using the 'p4 change' command, or automatically as the result of a ///
failed attempt to submit the default changelist. ///
///
The -d flag passes a description into the specified changelist rather ///
than displaying the changelist dialog for manual editing. This option ///
is useful for scripting, but does not allow you to add jobs or modify ///
the default changelist. ///
///
The -f flag enables you to override submit options that are configured ///
for the client that is submitting the changelist. This flag overrides ///
the -r (reopen)flag, if it is specified. See 'p4 help client' for ///
details about submit options. ///
///
The -i flag reads a changelist specification from the standard input. ///
The user's editor is not invoked. ///
///
The -r flag reopens submitted files in the default changelist after ///
submission. ///
///
The -s flag extends the list of jobs to include the fix status ///
for each job, which becomes the job's status when the changelist ///
is committed. See 'p4 help change' for details. ///
///
///
public SubmitCmdOptions(SubmitFilesCmdFlags flags, int changelist, Changelist newChangelist, string description, ClientSubmitOptions submitOptions) : base(flags, changelist, newChangelist, description, submitOptions) { } } /// /// Flags for the resolved command. /// [Flags] public enum GetResolvedFilesCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -r flag reopens submitted files in the default changelist after /// submission. /// IncludeBaseRevision = 0x0001, } public partial class Options { /// /// Resolved command options. /// /// /// /// ///
p4 help resolved ///
///
resolved -- Show files that have been resolved but not submitted ///
///
p4 resolved [-o] [file ...] ///
///
'p4 resolved' lists file updates and integrations that have been ///
resolved but not yet submitted. To see unresolved integrations, ///
use 'p4 resolve -n'. To see already submitted integrations, use ///
'p4 integrated'. ///
///
If a depot file path is specified, the output lists resolves for ///
'theirs' files that match the specified path. If a client file ///
path is specified, the output lists resolves for 'yours' files ///
that match the specified path. ///
///
The -o flag reports the revision used as the base during the ///
resolve. ///
///
///
public Options(GetResolvedFilesCmdFlags flags) { if ((flags & GetResolvedFilesCmdFlags.IncludeBaseRevision) != 0) { this["-o"] = null; } } } /// /// Options for Resolve command /// public class ResolvedCmdOptions : Options { /// /// Resolved command options. /// /// /// /// ///
p4 help resolved ///
///
resolved -- Show files that have been resolved but not submitted ///
///
p4 resolved [-o] [file ...] ///
///
'p4 resolved' lists file updates and integrations that have been ///
resolved but not yet submitted. To see unresolved integrations, ///
use 'p4 resolve -n'. To see already submitted integrations, use ///
'p4 integrated'. ///
///
If a depot file path is specified, the output lists resolves for ///
'theirs' files that match the specified path. If a client file ///
path is specified, the output lists resolves for 'yours' files ///
that match the specified path. ///
///
The -o flag reports the revision used as the base during the ///
resolve. ///
///
///
public ResolvedCmdOptions(GetResolvedFilesCmdFlags flags) :base(flags) {} } /// /// Flags for the revert command. /// [Flags] public enum RevertFilesCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -a flag reverts only files that are open for edit or integrate /// and are unchanged or missing. Files with pending integration records /// are left open. The file arguments are optional when -a is specified. /// UnchangedOnly = 0x0001, /// /// The -n flag displays a preview of the operation. /// Preview = 0x0002, /// /// The -k flag marks the file as reverted in server metadata without /// altering files in the client workspace. /// ServerOnly = 0x0004, } public partial class Options { /// /// Revert command options. /// /// /// /// /// ///
p4 help revert ///
///
revert -- Discard changes from an opened file ///
///
p4 revert [-a -n -k -c changelist#] file ... ///
///
Revert an open file to the revision that was synced from the depot, ///
discarding any edits or integrations that have been made. You must ///
explicitly specify the files to be reverted. Files are removed from ///
the changelist in which they are open. Locked files are unlocked. ///
///
The -a flag reverts only files that are open for edit or integrate ///
and are unchanged or missing. Files with pending integration records ///
are left open. The file arguments are optional when -a is specified. ///
///
The -n flag displays a preview of the operation. ///
///
The -k flag marks the file as reverted in server metadata without ///
altering files in the client workspace. ///
///
The -c flag reverts files that are open in the specified changelist. ///
///
///
public Options(RevertFilesCmdFlags flags, int changelist) { if ((flags & RevertFilesCmdFlags.UnchangedOnly) != 0) { this["-a"] = null; } if ((flags & RevertFilesCmdFlags.Preview) != 0) { this["-n"] = null; } if ((flags & RevertFilesCmdFlags.ServerOnly) != 0) { this["-k"] = null; } if (changelist > 0) { this["-c"] = changelist.ToString(); } if (changelist == 0) { this["-c"] = "default"; } } } public class RevertCmdOptions : Options { /// /// Revert command options. /// /// /// /// /// ///
p4 help revert ///
///
revert -- Discard changes from an opened file ///
///
p4 revert [-a -n -k -c changelist#] file ... ///
///
Revert an open file to the revision that was synced from the depot, ///
discarding any edits or integrations that have been made. You must ///
explicitly specify the files to be reverted. Files are removed from ///
the changelist in which they are open. Locked files are unlocked. ///
///
The -a flag reverts only files that are open for edit or integrate ///
and are unchanged or missing. Files with pending integration records ///
are left open. The file arguments are optional when -a is specified. ///
///
The -n flag displays a preview of the operation. ///
///
The -k flag marks the file as reverted in server metadata without ///
altering files in the client workspace. ///
///
The -c flag reverts files that are open in the specified changelist. ///
///
///
public RevertCmdOptions(RevertFilesCmdFlags flags, int changelist) : base( flags, changelist) {} } /// /// Flags for the shelve command. /// [Flags] public enum ShelveFilesCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -f (force) flag must be used with the -c or -i flag to overwrite /// any existing shelved files in a pending changelist. /// Force = 0x0001, /// /// The -r flag (used with -c or -i) enables you to replace all shelved /// files in that changelist with the files opened in your own workspace /// at that changelist number. Only the user and client workspace of the /// pending changelist can replace its shelved files. /// Replace = 0x0002, /// /// The -d flag (used with -c) deletes the shelved files in the specified /// changelist so that they can no longer be unshelved. By default, only /// the user and client of the pending changelist can delete its shelved /// files. A user with 'admin' access can delete shelved files by including /// the -f flag to force the operation. /// Delete = 0x0004, /// /// The -a flag enables you to handle unchanged files similarly to some /// client submit options, namely 'submitunchanged' and 'leaveunchanged'. /// The default behavior of shelving all files corresponds to the /// 'submitunchanged' option. The 'leaveunchanged' option only shelves /// changed files, and then leaves the files opened in the pending /// changelist on the client. /// ShelveUnchanged = 0x0008, /// /// The -a flag enables you to handle unchanged files similarly to some /// client submit options, namely 'submitunchanged' and 'leaveunchanged'. /// The default behavior of shelving all files corresponds to the /// 'submitunchanged' option. The 'leaveunchanged' option only shelves /// changed files, and then leaves the files opened in the pending /// changelist on the client. /// LeaveUnchanged = 0x0010, /// /// The -p flag promotes a shelved change from an edge server to a /// commitserver where it can be accessed by other edge servers /// participating in the distributed configuration. Once a shelved /// change has been promoted, all subsequent local modifications to /// the shelf are also pushed to the commit server and remain until /// the shelf is deleted. Once a shelf has been created, the combination /// of flags '-p -c' will promote the shelf without modification. /// Promote = 0x0020 } public partial class Options { /// /// Shelve command options. /// /// /// /// /// /// ///
p4 help shelve ///
///
shelve -- Store files from a pending changelist into the depot ///
///
p4 shelve [files] ///
p4 shelve -i [-f | -r] ///
p4 shelve -r -c changelist# ///
p4 shelve -c changelist# [-f] [file ...] ///
p4 shelve -d -c changelist# [-f] [file ...] ///
///
'p4 shelve' creates, modifies or deletes shelved files in a pending ///
changelist. Shelved files remain in the depot until they are deleted ///
(using 'p4 shelve -d') or replaced by subsequent shelve commands. ///
After 'p4 shelve', the user can revert the files and restore them ///
later using 'p4 unshelve'. Other users can 'p4 unshelve' the stored ///
files into their own workspaces. ///
///
Files that have been shelved can be accessed by the 'p4 diff', ///
'p4 diff2', 'p4 files' and 'p4 print' commands using the revision ///
specification '@=change', where 'change' is the pending changelist ///
number. ///
///
By default, 'p4 shelve' creates a changelist, adds files from the ///
user's default changelist, then shelves those files in the depot. ///
The user is presented with a text changelist form displayed using ///
the editor configured using the $P4EDITOR environment variable. ///
///
If a file pattern is specified, 'p4 shelve' shelves the files that ///
match the pattern. ///
///
The -i flag reads the pending changelist specification with shelved ///
files from the standard input. The user's editor is not invoked. ///
To modify an existing changelist with shelved files, specify the ///
changelist number using the -c flag. ///
///
The -c flag specifies the pending changelist that contains shelved ///
files to be created, deleted, or modified. Only the user and client ///
of the pending changelist can add or modify its shelved files. ///
///
The -f (force) flag must be used with the -c or -i flag to overwrite ///
any existing shelved files in a pending changelist. ///
///
The -r flag (used with -c or -i) enables you to replace all shelved ///
files in that changelist with the files opened in your own workspace ///
at that changelist number. Only the user and client workspace of the ///
pending changelist can replace its shelved files. ///
///
The -d flag (used with -c) deletes the shelved files in the specified ///
changelist so that they can no longer be unshelved. By default, only ///
the user and client of the pending changelist can delete its shelved ///
files. A user with 'admin' access can delete shelved files by including ///
the -f flag to force the operation. ///
///
///
public Options(ShelveFilesCmdFlags flags, Changelist newChangelist, int changelistId) { if (newChangelist != null) this["-i"] = newChangelist.ToString(); if ((flags & ShelveFilesCmdFlags.Delete) != 0) { this["-d"] = null; } if ((flags & ShelveFilesCmdFlags.Replace) != 0) { this["-r"] = null; } if (changelistId > 0) { this["-c"] = changelistId.ToString(); } if ((flags & ShelveFilesCmdFlags.Force) != 0) { this["-f"] = null; } if ((flags & ShelveFilesCmdFlags.ShelveUnchanged) != 0) { this["-a"] = "submitunchanged"; } if ((flags & ShelveFilesCmdFlags.LeaveUnchanged) != 0) { this["-a"] = "leaveunchanged"; } if ((flags & ShelveFilesCmdFlags.Promote) != 0) { this["-p"] = null; } } } /// /// Shelve command options. /// public class ShelveFilesCmdOptions : Options { /// /// Shelve command options. /// /// /// /// /// /// ///
p4 help shelve ///
///
shelve -- Store files from a pending changelist into the depot ///
///
p4 shelve [files] ///
p4 shelve -i [-f | -r] ///
p4 shelve -r -c changelist# ///
p4 shelve -c changelist# [-f] [file ...] ///
p4 shelve -d -c changelist# [-f] [file ...] ///
///
'p4 shelve' creates, modifies or deletes shelved files in a pending ///
changelist. Shelved files remain in the depot until they are deleted ///
(using 'p4 shelve -d') or replaced by subsequent shelve commands. ///
After 'p4 shelve', the user can revert the files and restore them ///
later using 'p4 unshelve'. Other users can 'p4 unshelve' the stored ///
files into their own workspaces. ///
///
Files that have been shelved can be accessed by the 'p4 diff', ///
'p4 diff2', 'p4 files' and 'p4 print' commands using the revision ///
specification '@=change', where 'change' is the pending changelist ///
number. ///
///
By default, 'p4 shelve' creates a changelist, adds files from the ///
user's default changelist, then shelves those files in the depot. ///
The user is presented with a text changelist form displayed using ///
the editor configured using the $P4EDITOR environment variable. ///
///
If a file pattern is specified, 'p4 shelve' shelves the files that ///
match the pattern. ///
///
The -i flag reads the pending changelist specification with shelved ///
files from the standard input. The user's editor is not invoked. ///
To modify an existing changelist with shelved files, specify the ///
changelist number using the -c flag. ///
///
The -c flag specifies the pending changelist that contains shelved ///
files to be created, deleted, or modified. Only the user and client ///
of the pending changelist can add or modify its shelved files. ///
///
The -f (force) flag must be used with the -c or -i flag to overwrite ///
any existing shelved files in a pending changelist. ///
///
The -r flag (used with -c or -i) enables you to replace all shelved ///
files in that changelist with the files opened in your own workspace ///
at that changelist number. Only the user and client workspace of the ///
pending changelist can replace its shelved files. ///
///
The -d flag (used with -c) deletes the shelved files in the specified ///
changelist so that they can no longer be unshelved. By default, only ///
the user and client of the pending changelist can delete its shelved ///
files. A user with 'admin' access can delete shelved files by including ///
the -f flag to force the operation. ///
///
///
public ShelveFilesCmdOptions(ShelveFilesCmdFlags flags, Changelist newChangelist, int changelistId) : base(flags, newChangelist, changelistId) { } } /// /// Flags for the sync command. /// [Flags] public enum SyncFilesCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -f flag forces resynchronization even if the client already /// has the file, and overwriting any writable files. This flag doesn't /// affect open files. /// Force = 0x0001, /// /// The -L flag can be used with multiple file arguments that are in /// full depot syntax and include a valid revision number. When this /// flag is used the arguments are processed together by building an /// internal table similar to a label. This file list processing is /// significantly faster than having to call the internal query engine /// for each individual file argument. However, the file argument syntax /// is strict and the command will not run if an error is encountered. /// ProcessLikeLabel = 0x0002, /// /// The -n flag previews the operation without updating the workspace. /// Preview = 0x0004, /// /// The -k flag updates server metadata without syncing files. It is /// intended to enable you to ensure that the server correctly reflects /// the state of files in the workspace while avoiding a large data /// transfer. Caution: an erroneous update can cause the server to /// incorrectly reflect the state of the workspace. /// ServerOnly = 0x0008, /// /// The -p flag populates the client workspace, but does not update the /// server to reflect those updates. Any file that is already synced or /// opened will be bypassed with a warning message. This option is very /// useful for build clients or when publishing content without the /// need to track the state of the client workspace. /// PopulateClient = 0x0010, /// /// The -q flag suppresses normal output messages. Messages regarding /// errors or exceptional conditions are not suppressed. /// Quiet = 0x0020, /// /// The -s flag adds a safety check before sending content to the client /// workspace. This check uses MD5 digests to compare the content on the /// clients workspace against content that was last synced. If the file /// has been modified outside of Perforce's control then an error message /// is displayed and the file is not overwritten. This check adds some /// extra processing which will affect the performance of the operation. /// SafeMode = 0x0040 } public partial class Options { /// /// Sync command options. /// /// /// /// ///
p4 help sync ///
///
sync -- Synchronize the client with its view of the depot ///
flush -- synonym for 'sync -k' ///
update -- synonym for 'sync -s' ///
///
p4 sync [-f -L -n -k -q] [-m max] [file[revRange] ...] ///
p4 sync [-L -n -q -s] [-m max] [file[revRange] ...] ///
p4 sync [-L -n -p -q] [-m max] [file[revRange] ...] ///
///
Sync updates the client workspace to reflect its current view (if ///
it has changed) and the current contents of the depot (if it has ///
changed). The client view maps client and depot file names and ///
locations. ///
///
Sync adds files that are in the client view and have not been ///
retrieved before. Sync deletes previously retrieved files that ///
are no longer in the client view or have been deleted from the ///
depot. Sync updates files that are still in the client view and ///
have been updated in the depot. ///
///
By default, sync affects all files in the client workspace. If file ///
arguments are given, sync limits its operation to those files. ///
The file arguments can contain wildcards. ///
///
If the file argument includes a revision specifier, then the given ///
revision is retrieved. Normally, the head revision is retrieved. ///
See 'p4 help revisions' for help specifying revisions. ///
///
If the file argument includes a revision range specification, ///
only files selected by the revision range are updated, and the ///
highest revision in the range is used. ///
///
Normally, sync does not overwrite workspace files that the user has ///
manually made writable. Setting the 'clobber' option in the ///
client specification disables this safety check. ///
///
The -f flag forces resynchronization even if the client already ///
has the file, and overwriting any writable files. This flag doesn't ///
affect open files. ///
///
The -L flag can be used with multiple file arguments that are in ///
full depot syntax and include a valid revision number. When this ///
flag is used the arguments are processed together by building an ///
internal table similar to a label. This file list processing is ///
significantly faster than having to call the internal query engine ///
for each individual file argument. However, the file argument syntax ///
is strict and the command will not run if an error is encountered. ///
///
The -n flag previews the operation without updating the workspace. ///
///
The -k flag updates server metadata without syncing files. It is ///
intended to enable you to ensure that the server correctly reflects ///
the state of files in the workspace while avoiding a large data ///
transfer. Caution: an erroneous update can cause the server to ///
incorrectly reflect the state of the workspace. ///
///
The -p flag populates the client workspace, but does not update the ///
server to reflect those updates. Any file that is already synced or ///
opened will be bypassed with a warning message. This option is very ///
useful for build clients or when publishing content without the ///
need to track the state of the client workspace. ///
///
The -q flag suppresses normal output messages. Messages regarding ///
errors or exceptional conditions are not suppressed. ///
///
The -s flag adds a safety check before sending content to the client ///
workspace. This check uses MD5 digests to compare the content on the ///
clients workspace against content that was last synced. If the file ///
has been modified outside of Perforce's control then an error message ///
is displayed and the file is not overwritten. This check adds some ///
extra processing which will affect the performance of the operation. ///
///
The -m flag limits sync to the first 'max' number of files. This ///
option is useful in conjunction with tagged output and the '-n' ///
flag, to preview how many files will be synced without transferring ///
all the file data. ///
///
///
public Options(SyncFilesCmdFlags flags, int maxItems) { if ((flags & SyncFilesCmdFlags.Force) != 0) { this["-f"] = null; } if ((flags & SyncFilesCmdFlags.ProcessLikeLabel) != 0) { this["-L"] = null; } if ((flags & SyncFilesCmdFlags.Preview) != 0) { this["-n"] = null; } if ((flags & SyncFilesCmdFlags.ServerOnly) != 0) { this["-k"] = null; } if ((flags & SyncFilesCmdFlags.PopulateClient) != 0) { this["-p"] = null; } if ((flags & SyncFilesCmdFlags.Quiet) != 0) { this["-q"] = null; } if ((flags & SyncFilesCmdFlags.SafeMode) != 0) { this["-s"] = null; } if (maxItems > 0) { this["-m"] = maxItems.ToString(); } } } /// /// Sync command options. /// public class SyncFilesCmdOptions: Options { /// /// Sync command options. /// /// /// /// ///
p4 help sync ///
///
sync -- Synchronize the client with its view of the depot ///
flush -- synonym for 'sync -k' ///
update -- synonym for 'sync -s' ///
///
p4 sync [-f -L -n -k -q] [-m max] [file[revRange] ...] ///
p4 sync [-L -n -q -s] [-m max] [file[revRange] ...] ///
p4 sync [-L -n -p -q] [-m max] [file[revRange] ...] ///
///
Sync updates the client workspace to reflect its current view (if ///
it has changed) and the current contents of the depot (if it has ///
changed). The client view maps client and depot file names and ///
locations. ///
///
Sync adds files that are in the client view and have not been ///
retrieved before. Sync deletes previously retrieved files that ///
are no longer in the client view or have been deleted from the ///
depot. Sync updates files that are still in the client view and ///
have been updated in the depot. ///
///
By default, sync affects all files in the client workspace. If file ///
arguments are given, sync limits its operation to those files. ///
The file arguments can contain wildcards. ///
///
If the file argument includes a revision specifier, then the given ///
revision is retrieved. Normally, the head revision is retrieved. ///
See 'p4 help revisions' for help specifying revisions. ///
///
If the file argument includes a revision range specification, ///
only files selected by the revision range are updated, and the ///
highest revision in the range is used. ///
///
Normally, sync does not overwrite workspace files that the user has ///
manually made writable. Setting the 'clobber' option in the ///
client specification disables this safety check. ///
///
The -f flag forces resynchronization even if the client already ///
has the file, and overwriting any writable files. This flag doesn't ///
affect open files. ///
///
The -L flag can be used with multiple file arguments that are in ///
full depot syntax and include a valid revision number. When this ///
flag is used the arguments are processed together by building an ///
internal table similar to a label. This file list processing is ///
significantly faster than having to call the internal query engine ///
for each individual file argument. However, the file argument syntax ///
is strict and the command will not run if an error is encountered. ///
///
The -n flag previews the operation without updating the workspace. ///
///
The -k flag updates server metadata without syncing files. It is ///
intended to enable you to ensure that the server correctly reflects ///
the state of files in the workspace while avoiding a large data ///
transfer. Caution: an erroneous update can cause the server to ///
incorrectly reflect the state of the workspace. ///
///
The -p flag populates the client workspace, but does not update the ///
server to reflect those updates. Any file that is already synced or ///
opened will be bypassed with a warning message. This option is very ///
useful for build clients or when publishing content without the ///
need to track the state of the client workspace. ///
///
The -q flag suppresses normal output messages. Messages regarding ///
errors or exceptional conditions are not suppressed. ///
///
The -s flag adds a safety check before sending content to the client ///
workspace. This check uses MD5 digests to compare the content on the ///
clients workspace against content that was last synced. If the file ///
has been modified outside of Perforce's control then an error message ///
is displayed and the file is not overwritten. This check adds some ///
extra processing which will affect the performance of the operation. ///
///
The -m flag limits sync to the first 'max' number of files. This ///
option is useful in conjunction with tagged output and the '-n' ///
flag, to preview how many files will be synced without transferring ///
all the file data. ///
///
///
public SyncFilesCmdOptions(SyncFilesCmdFlags flags, int maxItems) :base (flags, maxItems) { } } /// /// Flags for the unlock command. /// [Flags] public enum UnlockFilesCmdFlags { /// /// No flags. /// None = 0x0000, /// /// By default, files can be unlocked only by the changelist owner. The /// -f flag enables you to unlock files in changelists owned by other /// users. The -f flag requires 'admin' access, which is granted by 'p4 /// protect'. /// Force = 0x0001 } public partial class Options { /// /// Unlock command options. /// /// /// /// /// ///
p4 help unlock ///
///
unlock -- Release a locked file, leaving it open ///
///
p4 unlock [-c changelist#] [-f] [file ...] ///
///
'p4 unlock' releases locks on the specified files, which must be ///
open in the specified pending changelist. If you omit the changelist ///
number, the default changelist is assumed. If you omit the file name, ///
all locked files are unlocked. ///
///
By default, files can be unlocked only by the changelist owner. The ///
-f flag enables you to unlock files in changelists owned by other ///
users. The -f flag requires 'admin' access, which is granted by 'p4 ///
protect'. ///
///
///
public Options(UnlockFilesCmdFlags flags, int changelistId) { if (changelistId > 0) { this["-c"] = changelistId.ToString(); } if ((flags & UnlockFilesCmdFlags.Force) != 0) { this["-f"] = null; } } } /// /// Unlock command options. /// public class UnlockFilesCmdOptions : Options { /// /// Unlock command options. /// /// /// /// /// ///
p4 help unlock ///
///
unlock -- Release a locked file, leaving it open ///
///
p4 unlock [-c changelist#] [-f] [file ...] ///
///
'p4 unlock' releases locks on the specified files, which must be ///
open in the specified pending changelist. If you omit the changelist ///
number, the default changelist is assumed. If you omit the file name, ///
all locked files are unlocked. ///
///
By default, files can be unlocked only by the changelist owner. The ///
-f flag enables you to unlock files in changelists owned by other ///
users. The -f flag requires 'admin' access, which is granted by 'p4 ///
protect'. ///
///
///
public UnlockFilesCmdOptions(UnlockFilesCmdFlags flags, int changelistId) : base(flags, changelistId) {} } /// /// Flags for the unshelve command. /// [Flags] public enum UnshelveFilesCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -f flag forces the clobbering of any writeable but unopened files /// that are being unshelved. /// Force = 0x0001, /// /// The -n flag previews the operation without changing any files or /// metadata. /// Preview = 0x0002, } public partial class Options { /// /// Unshelve command options. /// /// /// /// /// /// ///
p4 help unshelve ///
///
unshelve -- Restore shelved files from a pending change into a workspace ///
///
p4 unshelve -s changelist# [-f -n] [-c changelist#] [file ...] ///
///
'p4 unshelve' retrieves shelved files from the specified pending ///
changelist, opens them in a pending changelist and copies them ///
to the invoking user's workspace. Unshelving files from a pending ///
changelist is restricted by the user's permissions on the files. ///
A successful unshelve operation places the shelved files on the ///
user's workspace with the same open action and pending integration ///
history as if it had originated from that user and client. ///
///
Unshelving a file over an already opened file is only permitted ///
if both shelved file and opened file are opened for 'edit'. After ///
unshelving, the workspace file is flagged as unresolved, and ///
'p4 resolve' must be run to resolve the differences between the ///
shelved file and the workspace file. ///
///
The -s flag specifies the number of the pending changelist that ///
contains the shelved files. ///
///
If a file pattern is specified, 'p4 unshelve' unshelves files that ///
match the pattern. ///
///
The -c flag specifies the changelist to which files are unshelved. ///
By default, 'p4 unshelve' opens shelved files in the default ///
changelist. ///
///
The -f flag forces the clobbering of any writeable but unopened files ///
that are being unshelved. ///
///
The -n flag previews the operation without changing any files or ///
metadata. ///
///
///
public Options(UnshelveFilesCmdFlags flags, int changelistId, int newChangelistId) { this["-s"] = changelistId.ToString(); if ((flags & UnshelveFilesCmdFlags.Force) != 0) { this["-f"] = null; } if ((flags & UnshelveFilesCmdFlags.Preview) != 0) { this["-n"] = null; } if (newChangelistId > 0) { this["-c"] = newChangelistId.ToString(); } if (newChangelistId == 0) { this["-c"] = "default"; } } } /// /// Unshelve command options. /// public class UnshelveFilesCmdOptions : Options { /// /// Unshelve command options. /// /// /// /// /// /// ///
p4 help unshelve ///
///
unshelve -- Restore shelved files from a pending change into a workspace ///
///
p4 unshelve -s changelist# [-f -n] [-c changelist#] [file ...] ///
///
'p4 unshelve' retrieves shelved files from the specified pending ///
changelist, opens them in a pending changelist and copies them ///
to the invoking user's workspace. Unshelving files from a pending ///
changelist is restricted by the user's permissions on the files. ///
A successful unshelve operation places the shelved files on the ///
user's workspace with the same open action and pending integration ///
history as if it had originated from that user and client. ///
///
Unshelving a file over an already opened file is only permitted ///
if both shelved file and opened file are opened for 'edit'. After ///
unshelving, the workspace file is flagged as unresolved, and ///
'p4 resolve' must be run to resolve the differences between the ///
shelved file and the workspace file. ///
///
The -s flag specifies the number of the pending changelist that ///
contains the shelved files. ///
///
If a file pattern is specified, 'p4 unshelve' unshelves files that ///
match the pattern. ///
///
The -c flag specifies the changelist to which files are unshelved. ///
By default, 'p4 unshelve' opens shelved files in the default ///
changelist. ///
///
The -f flag forces the clobbering of any writeable but unopened files ///
that are being unshelved. ///
///
The -n flag previews the operation without changing any files or ///
metadata. ///
///
///
public UnshelveFilesCmdOptions(UnshelveFilesCmdFlags flags, int changelistId, int newChangelistId) : base(flags, changelistId, newChangelistId) { } } /// /// Flags for the copy command. /// [Flags] public enum CopyFilesCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -n flag displays a preview of the copy, without actually doing /// anything. /// Preview = 0x0001, /// /// The -v flag causes a 'virtual' copy that does not modify client /// workspace files. After submitting a virtual integration, 'p4 sync' /// can be used to update the workspace. /// Virtual = 0x0002, /// /// The -r flag causes the direction of the copy to be reversed when /// used with a branch (-b) or stream (-S) copy. /// Reverse = 0x0004, /// /// The -F flag can be used with -S to force copying even though the /// stream does not expect a copy to occur in the direction indicated. /// Normally 'p4 copy' enforces the expected flow of change dictated /// by the stream's spec. The 'p4 istat' command summarizes a stream's /// expected flow of change. /// Force = 0x0008, /// /// The -s flag can be used with -b to cause fromFile to be treated as /// the source, and both sides of the user-defined branch view to be /// treated as the target, per the branch view mapping. Optional toFile /// arguments may be given to further restrict the scope of the target /// file set. -r is ignored when -s is used. /// SourceBranch = 0x0010 } public partial class Options { /// /// Copy command options. /// /// /// /// /// /// /// /// /// ///
p4 help copy ///
///
copy -- Copy one set of files to another ///
///
p4 copy [options] fromFile[rev] toFile ///
p4 copy [options] -b branch [-r] [toFile[rev] ...] ///
p4 copy [options] -b branch -s fromFile[rev] [toFile ...] ///
p4 copy [options] -S stream [-P parent] [-F] [-r] [toFile[rev] ...] ///
///
options: -c changelist# -n -v -m max ///
///
'p4 copy' copies one set of files (the 'source') into another (the ///
'target'). ///
///
Using the client workspace as a staging area, 'p4 copy' makes the ///
target identical to the source by branching, replacing, or deleting ///
files. 'p4 submit' submits copied files to the depot. 'p4 revert' ///
can be used to revert copied files instead of submitting them. The ///
history of copied files can be shown with 'p4 filelog' or 'p4 ///
integrated'. ///
///
Target files that are already identical to the source, or that are ///
outside of the client view, are not affected by 'p4 copy'. Opened, ///
non-identical target files cause 'p4 copy' to exit with a warning. ///
When 'p4 copy' creates or modifies files in the workspace, it leaves ///
them read-only; 'p4 edit' can make them writable. Files opened by ///
'p4 copy' do not need to be resolved. ///
///
Source and target files (fromFile and toFile) can be specified on ///
the 'p4 copy' command line or through a branch view. On the command ///
line, fromFile is the source file set and toFile is the target file ///
set. With a branch view, one or more toFile arguments can be given ///
to limit the scope of the target file set. ///
///
A revision specifier can be used to select the revision to copy; by ///
default, the head revision is copied. The revision specifier can be ///
used on fromFile, or on toFile, but not on both. When used on toFile, ///
it refers to source revisions, not to target revisions. A range may ///
not be used as a revision specifier. For revision syntax, see 'p4 ///
help revisions'. ///
///
The -S flag makes 'p4 copy' use a stream's branch view. (See 'p4 help ///
stream'.) The source is the stream itself, and the target is the ///
stream's parent. With -r, the direction is reversed. -P can be used ///
to specify a parent stream other than the stream's actual parent. ///
Note that to submit copied stream files, the current client must ///
be dedicated to the target stream. (See 'p4 help client'.) ///
///
The -F flag can be used with -S to force copying even though the ///
stream does not expect a copy to occur in the direction indicated. ///
Normally 'p4 copy' enforces the expected flow of change dictated ///
by the stream's spec. The 'p4 istat' command summarizes a stream's ///
expected flow of change. ///
///
The -b flag makes 'p4 copy' use a user-defined branch view. (See ///
'p4 help branch'.) The source is the left side of the branch view ///
and the target is the right side. With -r, the direction is reversed. ///
///
The -s flag can be used with -b to cause fromFile to be treated as ///
the source, and both sides of the user-defined branch view to be ///
treated as the target, per the branch view mapping. Optional toFile ///
arguments may be given to further restrict the scope of the target ///
file set. -r is ignored when -s is used. ///
///
The -c changelist# flag opens files in the designated (numbered) ///
pending changelist instead of the default changelist. ///
///
The -n flag displays a preview of the copy, without actually doing ///
anything. ///
///
The -m flag limits the actions to the first 'max' number of files. ///
///
The -v flag causes a 'virtual' copy that does not modify client ///
workspace files. After submitting a virtual integration, 'p4 sync' ///
can be used to update the workspace. ///
///
///
public Options(CopyFilesCmdFlags flags, string branchName, string streamName, string parentStream, int changelistId, int maxItems) { if (changelistId >= 0) { this["-c"] = changelistId.ToString(); } if ((flags & CopyFilesCmdFlags.Preview) != 0) { this["-n"] = null; } if ((flags & CopyFilesCmdFlags.Virtual) != 0) { this["-v"] = null; } if (maxItems >= 0) { this["-m"] = maxItems.ToString(); } if (String.IsNullOrEmpty(branchName) != true) { this["-b"] = branchName; } if (String.IsNullOrEmpty(streamName) != true) { this["-S"] = streamName; } if (String.IsNullOrEmpty(parentStream) != true) { this["-P"] = parentStream; } if ((flags & CopyFilesCmdFlags.Force) != 0) { this["-F"] = null; } if ((flags & CopyFilesCmdFlags.Reverse) != 0) { this["-r"] = null; } if ((flags & CopyFilesCmdFlags.SourceBranch) != 0) { this["-r"] = null; } } } /// /// Copy command options. /// public class CopyFilesCmdOptions : Options { /// /// Copy command options. /// /// /// /// /// /// /// /// /// ///
p4 help copy ///
///
copy -- Copy one set of files to another ///
///
p4 copy [options] fromFile[rev] toFile ///
p4 copy [options] -b branch [-r] [toFile[rev] ...] ///
p4 copy [options] -b branch -s fromFile[rev] [toFile ...] ///
p4 copy [options] -S stream [-P parent] [-F] [-r] [toFile[rev] ...] ///
///
options: -c changelist# -n -v -m max ///
///
'p4 copy' copies one set of files (the 'source') into another (the ///
'target'). ///
///
Using the client workspace as a staging area, 'p4 copy' makes the ///
target identical to the source by branching, replacing, or deleting ///
files. 'p4 submit' submits copied files to the depot. 'p4 revert' ///
can be used to revert copied files instead of submitting them. The ///
history of copied files can be shown with 'p4 filelog' or 'p4 ///
integrated'. ///
///
Target files that are already identical to the source, or that are ///
outside of the client view, are not affected by 'p4 copy'. Opened, ///
non-identical target files cause 'p4 copy' to exit with a warning. ///
When 'p4 copy' creates or modifies files in the workspace, it leaves ///
them read-only; 'p4 edit' can make them writable. Files opened by ///
'p4 copy' do not need to be resolved. ///
///
Source and target files (fromFile and toFile) can be specified on ///
the 'p4 copy' command line or through a branch view. On the command ///
line, fromFile is the source file set and toFile is the target file ///
set. With a branch view, one or more toFile arguments can be given ///
to limit the scope of the target file set. ///
///
A revision specifier can be used to select the revision to copy; by ///
default, the head revision is copied. The revision specifier can be ///
used on fromFile, or on toFile, but not on both. When used on toFile, ///
it refers to source revisions, not to target revisions. A range may ///
not be used as a revision specifier. For revision syntax, see 'p4 ///
help revisions'. ///
///
The -S flag makes 'p4 copy' use a stream's branch view. (See 'p4 help ///
stream'.) The source is the stream itself, and the target is the ///
stream's parent. With -r, the direction is reversed. -P can be used ///
to specify a parent stream other than the stream's actual parent. ///
Note that to submit copied stream files, the current client must ///
be dedicated to the target stream. (See 'p4 help client'.) ///
///
The -F flag can be used with -S to force copying even though the ///
stream does not expect a copy to occur in the direction indicated. ///
Normally 'p4 copy' enforces the expected flow of change dictated ///
by the stream's spec. The 'p4 istat' command summarizes a stream's ///
expected flow of change. ///
///
The -b flag makes 'p4 copy' use a user-defined branch view. (See ///
'p4 help branch'.) The source is the left side of the branch view ///
and the target is the right side. With -r, the direction is reversed. ///
///
The -s flag can be used with -b to cause fromFile to be treated as ///
the source, and both sides of the user-defined branch view to be ///
treated as the target, per the branch view mapping. Optional toFile ///
arguments may be given to further restrict the scope of the target ///
file set. -r is ignored when -s is used. ///
///
The -c changelist# flag opens files in the designated (numbered) ///
pending changelist instead of the default changelist. ///
///
The -n flag displays a preview of the copy, without actually doing ///
anything. ///
///
The -m flag limits the actions to the first 'max' number of files. ///
///
The -v flag causes a 'virtual' copy that does not modify client ///
workspace files. After submitting a virtual integration, 'p4 sync' ///
can be used to update the workspace. ///
///
///
public CopyFilesCmdOptions(CopyFilesCmdFlags flags, string branchName, string streamName, string parentStream, int changelistId, int maxItems) :base(flags, branchName, streamName, parentStream, changelistId, maxItems) {} } /// /// Flags for the merge command. /// [Flags] public enum MergeFilesCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -n flag displays a preview of the copy, without actually doing /// anything. /// Preview = 0x0001, /// /// The -r flag causes the direction of the copy to be reversed when /// used with a branch (-b) or stream (-S) copy. /// Reverse = 0x0002, /// /// The -F flag can be used with -S to force copying even though the /// stream does not expect a copy to occur in the direction indicated. /// Normally 'p4 copy' enforces the expected flow of change dictated /// by the stream's spec. The 'p4 istat' command summarizes a stream's /// expected flow of change. /// Force = 0x0004, /// /// The -s flag can be used with -b to cause fromFile to be treated as /// the source, and both sides of the user-defined branch view to be /// treated as the target, per the branch view mapping. Optional toFile /// arguments may be given to further restrict the scope of the target /// file set. -r is ignored when -s is used. /// SourceBranch = 0x0008 } public partial class Options { ///
p4 help merge ///
///
merge -- Merge one set of files into another ///
///
p4 merge [options] fromFile[revRange] toFile ///
p4 merge [options] -b branch [-r] [toFile[revRange] ...] ///
p4 merge [options] -b branch -s fromFile[revRange] [toFile ...] ///
p4 merge [options] -S stream [-P parent] [-F] [-r] [toFile[revRange] ...] ///
///
options: -c changelist# -n -m max ///
///
'p4 merge' merges changes from one set of files (the 'source') into ///
another (the 'target'). It is a simplified form of the 'p4 integrate' ///
command. ///
///
Using the client workspace as a staging area, 'p4 merge' branches and ///
deletes target files per changes in the source, and schedules all ///
other affected target files to be resolved. Target files outside of ///
the current client view are not affected. Source files need not be ///
within the client view. ///
///
'p4 resolve' must be used to merge file content, and to resolve ///
filename and filetype changes. 'p4 submit' commits merged files to ///
the depot. Unresolved files may not be submitted. Merged files can ///
be shelved with 'p4 shelve' and abandoned with 'p4 revert'. The ///
commands 'p4 integrated' and 'p4 filelog' display merge history. ///
///
When 'p4 merge' schedules a workspace file to be resolved, it leaves ///
it read-only. 'p4 resolve' can operate on a read-only file; for ///
other pre-submit changes, 'p4 edit' must be used to make the file ///
writable. ///
///
Source and target files can be specified either on the 'p4 merge' ///
command line or through a branch view. On the command line, fromFile ///
is the source file set and toFile is the target file set. With a ///
branch view, one or more toFile arguments can be given to limit the ///
scope of the target file set. ///
///
Each file in the target is mapped to a file in the source. Mapping ///
adjusts automatically for files that have been moved or renamed, as ///
long as 'p4 move' was used to move/rename files. The scope of source ///
and target file sets must include both old-named and new-named files ///
for mappings to be adjusted. Moved source files may schedule moves ///
to be resolved in target files. ///
///
revRange is a revision or a revision range that limits the span of ///
source history to be probed for unintegrated revisions. revRange ///
can be used on fromFile, or on toFile, but not on both. When used ///
on toFile, it refers to source revisions, not to target revisions. ///
For details about revision specifiers, see 'p4 help revisions'. ///
///
The -S flag makes 'p4 merge' use a stream's branch view. (See 'p4 ///
help stream'.) The source is the stream itself, and the target is ///
the stream's parent. With -r, the direction is reversed. -P can be ///
used to specify a parent stream other than the stream's actual parent. ///
Note that to submit merged stream files, the current client must ///
be dedicated to the target stream. (See 'p4 help client'.) ///
///
The -F flag can be used with -S to force merging even though the ///
stream does not expect a merge to occur in the direction indicated. ///
Normally 'p4 merge' enforces the expected flow of change dictated ///
by the stream's spec. The 'p4 istat' command summarizes a stream's ///
expected flow of change. ///
///
The -b flag makes 'p4 merge' use a user-defined branch view. (See ///
'p4 help branch'.) The source is the left side of the branch view ///
and the target is the right side. With -r, the direction is reversed. ///
///
The -s flag can be used with -b to cause fromFile to be treated as ///
the source, and both sides of the branch view to be treated as the ///
target, per the branch view mapping. Optional toFile arguments may ///
be given to further restrict the scope of the target file set. The ///
-r flag is ignored when -s is used. ///
///
public Options(MergeFilesCmdFlags flags, string branchName, string streamName, string parentStream, int changelistId, int maxItems) { if (changelistId >= 0) { this["-c"] = changelistId.ToString(); } if ((flags & MergeFilesCmdFlags.Preview) != 0) { this["-n"] = null; } if (maxItems >= 0) { this["-m"] = maxItems.ToString(); } if (String.IsNullOrEmpty(branchName) != true) { this["-b"] = branchName; } if (String.IsNullOrEmpty(streamName) != true) { this["-S"] = streamName; } if (String.IsNullOrEmpty(parentStream) != true) { this["-P"] = parentStream; } if ((flags & MergeFilesCmdFlags.Force) != 0) { this["-F"] = null; } if ((flags & MergeFilesCmdFlags.Reverse) != 0) { this["-r"] = null; } if ((flags & MergeFilesCmdFlags.SourceBranch) != 0) { this["-r"] = null; } } } /// /// Merge command options. /// public class MergeFilesCmdOptions : Options { ///
p4 help merge ///
///
merge -- Merge one set of files into another ///
///
p4 merge [options] fromFile[revRange] toFile ///
p4 merge [options] -b branch [-r] [toFile[revRange] ...] ///
p4 merge [options] -b branch -s fromFile[revRange] [toFile ...] ///
p4 merge [options] -S stream [-P parent] [-F] [-r] [toFile[revRange] ...] ///
///
options: -c changelist# -n -m max ///
///
'p4 merge' merges changes from one set of files (the 'source') into ///
another (the 'target'). It is a simplified form of the 'p4 integrate' ///
command. ///
///
Using the client workspace as a staging area, 'p4 merge' branches and ///
deletes target files per changes in the source, and schedules all ///
other affected target files to be resolved. Target files outside of ///
the current client view are not affected. Source files need not be ///
within the client view. ///
///
'p4 resolve' must be used to merge file content, and to resolve ///
filename and filetype changes. 'p4 submit' commits merged files to ///
the depot. Unresolved files may not be submitted. Merged files can ///
be shelved with 'p4 shelve' and abandoned with 'p4 revert'. The ///
commands 'p4 integrated' and 'p4 filelog' display merge history. ///
///
When 'p4 merge' schedules a workspace file to be resolved, it leaves ///
it read-only. 'p4 resolve' can operate on a read-only file; for ///
other pre-submit changes, 'p4 edit' must be used to make the file ///
writable. ///
///
Source and target files can be specified either on the 'p4 merge' ///
command line or through a branch view. On the command line, fromFile ///
is the source file set and toFile is the target file set. With a ///
branch view, one or more toFile arguments can be given to limit the ///
scope of the target file set. ///
///
Each file in the target is mapped to a file in the source. Mapping ///
adjusts automatically for files that have been moved or renamed, as ///
long as 'p4 move' was used to move/rename files. The scope of source ///
and target file sets must include both old-named and new-named files ///
for mappings to be adjusted. Moved source files may schedule moves ///
to be resolved in target files. ///
///
revRange is a revision or a revision range that limits the span of ///
source history to be probed for unintegrated revisions. revRange ///
can be used on fromFile, or on toFile, but not on both. When used ///
on toFile, it refers to source revisions, not to target revisions. ///
For details about revision specifiers, see 'p4 help revisions'. ///
///
The -S flag makes 'p4 merge' use a stream's branch view. (See 'p4 ///
help stream'.) The source is the stream itself, and the target is ///
the stream's parent. With -r, the direction is reversed. -P can be ///
used to specify a parent stream other than the stream's actual parent. ///
Note that to submit merged stream files, the current client must ///
be dedicated to the target stream. (See 'p4 help client'.) ///
///
The -F flag can be used with -S to force merging even though the ///
stream does not expect a merge to occur in the direction indicated. ///
Normally 'p4 merge' enforces the expected flow of change dictated ///
by the stream's spec. The 'p4 istat' command summarizes a stream's ///
expected flow of change. ///
///
The -b flag makes 'p4 merge' use a user-defined branch view. (See ///
'p4 help branch'.) The source is the left side of the branch view ///
and the target is the right side. With -r, the direction is reversed. ///
///
The -s flag can be used with -b to cause fromFile to be treated as ///
the source, and both sides of the branch view to be treated as the ///
target, per the branch view mapping. Optional toFile arguments may ///
be given to further restrict the scope of the target file set. The ///
-r flag is ignored when -s is used. ///
///
public MergeFilesCmdOptions(MergeFilesCmdFlags flags, string branchName, string streamName, string parentStream, int changelistId, int maxItems) : base(flags, branchName, streamName, parentStream, changelistId, maxItems) { } } /// /// Flags for the fix command. /// [Flags] public enum FixJobsCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -d flag deletes the specified fixes. This operation does not /// otherwise affect the specified changelist or jobs. /// Delete = 0x0001 } public partial class Options { /// /// Fix command options. /// /// /// /// /// /// ///
p4 help fix ///
///
fix -- Mark jobs as being fixed by the specified changelist ///
///
p4 fix [-d] [-s status] -c changelist# jobName ... ///
///
'p4 fix' marks each named job as being fixed by the changelist ///
number specified with -c. The changelist can be pending or ///
submitted and the jobs can open or closed (fixed by another ///
changelist). ///
///
If the changelist has already been submitted and the job is still ///
open, then 'p4 fix' marks the job closed. If the changelist has not ///
been submitted and the job is still open, the job is closed when the ///
changelist is submitted. If the job is already closed, it remains ///
closed. ///
///
The -d flag deletes the specified fixes. This operation does not ///
otherwise affect the specified changelist or jobs. ///
///
The -s flag uses the specified status instead of the default defined ///
in the job specification. This status is reported by 'p4 fixes'. ///
The 'p4 fix' and 'p4 change' (of a submitted changelist) and 'p4 submit' ///
(of a pending changelist) commands set the job's status to the fix's ///
status for each job associated with the change. If the fix's status ///
is 'same', the job's status is left unchanged. ///
///
///
public Options(FixJobsCmdFlags flags, int changelistId, string status) { if ((flags & FixJobsCmdFlags.Delete) != 0) { this["-d"] = null; } if (String.IsNullOrEmpty(status) != true) { this["-s"] = status; } if (changelistId >= 0) { this["-c"] = changelistId.ToString(); } } } /// /// Fix command options. /// public class FixJobsCmdOptions : Options { /// /// Fix command options. /// /// /// /// /// /// ///
p4 help fix ///
///
fix -- Mark jobs as being fixed by the specified changelist ///
///
p4 fix [-d] [-s status] -c changelist# jobName ... ///
///
'p4 fix' marks each named job as being fixed by the changelist ///
number specified with -c. The changelist can be pending or ///
submitted and the jobs can open or closed (fixed by another ///
changelist). ///
///
If the changelist has already been submitted and the job is still ///
open, then 'p4 fix' marks the job closed. If the changelist has not ///
been submitted and the job is still open, the job is closed when the ///
changelist is submitted. If the job is already closed, it remains ///
closed. ///
///
The -d flag deletes the specified fixes. This operation does not ///
otherwise affect the specified changelist or jobs. ///
///
The -s flag uses the specified status instead of the default defined ///
in the job specification. This status is reported by 'p4 fixes'. ///
The 'p4 fix' and 'p4 change' (of a submitted changelist) and 'p4 submit' ///
(of a pending changelist) commands set the job's status to the fix's ///
status for each job associated with the change. If the fix's status ///
is 'same', the job's status is left unchanged. ///
///
///
public FixJobsCmdOptions(FixJobsCmdFlags flags, int changelistId, string status) : base( flags, changelistId, status) {} } /// /// Flags for the user command. /// [Flags] public enum UserCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -d flag deletes the specified user (unless the user has files /// open). /// Delete = 0x0001, /// /// The -o flag writes the user specification to the standard output. /// The user's editor is not invoked. /// Output = 0x0002, /// /// The -i flag reads a user specification from the standard input. /// The user's editor is not invoked. /// Input = 0x0004, /// /// The -f flag forces the creation, update or deletion of the specified /// user, and enables you to change the Last Modified date. By default, /// users can only delete or modify their own user specifications. The /// -f flag requires 'super' access, which is granted by 'p4 protect'. /// Force = 0x0008, } public partial class Options { /// /// User command options. /// /// /// /// ///
p4 help user ///
///
user -- Create or edit a user specification ///
///
p4 user [-f] [name] ///
p4 user -d [-f] name ///
p4 user -o [name] ///
p4 user -i [-f] ///
///
Create a new user specification or edit an existing user specification. ///
The specification form is put into a temporary file and the editor ///
(configured by the environment variable $P4EDITOR) is invoked. ///
///
Normally, a user specification is created automatically the first ///
time that the user issues any command that updates the depot. The ///
'p4 user' command is typically used to edit the user's subscription ///
list for change review. ///
///
The user specification form contains the following fields: ///
///
User: The user name (read-only). ///
///
Email: The user's email address (Default: user@client). ///
///
Update: The date the specification was last modified (read-only). ///
///
Access: The date that the user last issued a client command. ///
///
FullName: The user's real name. ///
///
JobView: Selects jobs that are displayed when the user creates ///
a changelist. These jobs can be closed automatically ///
when the user submits the changelist. For a description ///
of jobview syntax, see 'p4 help jobview' ///
///
Reviews: The subscription list for change review. There is no ///
limit on the number of lines that this field can contain. ///
You can include the following wildcards: ///
///
... matches any characters including / ///
* matches any character except / ///
///
Password: The user's password. See 'p4 help passwd'. ///
///
Type: Must be 'service', operator, or 'standard'. Default is ///
'standard'. Once set, the user type cannot be changed. ///
///
The -d flag deletes the specified user (unless the user has files ///
open). ///
///
The -o flag writes the user specification to the standard output. ///
The user's editor is not invoked. ///
///
The -i flag reads a user specification from the standard input. ///
The user's editor is not invoked. ///
///
The -f flag forces the creation, update or deletion of the specified ///
user, and enables you to change the Last Modified date. By default, ///
users can only delete or modify their own user specifications. The ///
-f flag requires 'super' access, which is granted by 'p4 protect'. ///
///
///
public Options(UserCmdFlags flags) { if ((flags & UserCmdFlags.Output) != 0) { this["-o"] = null; } if ((flags & UserCmdFlags.Input) != 0) { this["-i"] = null; } if ((flags & UserCmdFlags.Delete) != 0) { this["-d"] = null; } if ((flags & UserCmdFlags.Force) != 0) { this["-f"] = null; } } } /// /// User command options. /// public class UserCmdOptions : Options { /// /// User command options. /// /// /// /// ///
p4 help user ///
///
user -- Create or edit a user specification ///
///
p4 user [-f] [name] ///
p4 user -d [-f] name ///
p4 user -o [name] ///
p4 user -i [-f] ///
///
Create a new user specification or edit an existing user specification. ///
The specification form is put into a temporary file and the editor ///
(configured by the environment variable $P4EDITOR) is invoked. ///
///
Normally, a user specification is created automatically the first ///
time that the user issues any command that updates the depot. The ///
'p4 user' command is typically used to edit the user's subscription ///
list for change review. ///
///
The user specification form contains the following fields: ///
///
User: The user name (read-only). ///
///
Email: The user's email address (Default: user@client). ///
///
Update: The date the specification was last modified (read-only). ///
///
Access: The date that the user last issued a client command. ///
///
FullName: The user's real name. ///
///
JobView: Selects jobs that are displayed when the user creates ///
a changelist. These jobs can be closed automatically ///
when the user submits the changelist. For a description ///
of jobview syntax, see 'p4 help jobview' ///
///
Reviews: The subscription list for change review. There is no ///
limit on the number of lines that this field can contain. ///
You can include the following wildcards: ///
///
... matches any characters including / ///
* matches any character except / ///
///
Password: The user's password. See 'p4 help passwd'. ///
///
Type: Must be 'service', operator, or 'standard'. Default is ///
'standard'. Once set, the user type cannot be changed. ///
///
The -d flag deletes the specified user (unless the user has files ///
open). ///
///
The -o flag writes the user specification to the standard output. ///
The user's editor is not invoked. ///
///
The -i flag reads a user specification from the standard input. ///
The user's editor is not invoked. ///
///
The -f flag forces the creation, update or deletion of the specified ///
user, and enables you to change the Last Modified date. By default, ///
users can only delete or modify their own user specifications. The ///
-f flag requires 'super' access, which is granted by 'p4 protect'. ///
///
///
public UserCmdOptions(UserCmdFlags flags) : base(flags) { } } /// /// Flags for the users command. /// [Flags] public enum UsersCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -a flag includes service and operator users in the output. /// IncludeAll = 0x0001, /// /// The -l flag includes additional information in the output. The -l /// flag requires 'super' access, which is granted by 'p4 protect'. /// LongForm = 0x0002 } public partial class Options { /// /// Users command options. /// /// /// /// /// ///
p4 help users ///
///
users -- List Perforce users ///
///
p4 users [-l -a -r -c] [-m max] [user ...] ///
///
Lists all Perforce users or users that match the 'user' argument. ///
The report includes the last time that each user accessed the system. ///
///
The -m max flag limits output to the first 'max' number of users. ///
///
The -a flag includes service and operator users in the output. ///
///
The -l flag includes additional information in the output. The -l ///
flag requires 'super' access, which is granted by 'p4 protect'. ///
///
The -r and -c flags are only allowed on replica servers. When ///
-r is given only users who have used a replica are reported and ///
when -c is given only the user information from the central server ///
is reported. Otherwise on a replica server, the user list will ///
be slightly different from the master server as the user access times ///
will reflect replica usage or master usage whichever is newer. ///
///
///
public Options(UsersCmdFlags flags, int maxItems) { if ((flags & UsersCmdFlags.IncludeAll) != 0) { this["-a"] = null; } if ((flags & UsersCmdFlags.LongForm) != 0) { this["-l"] = null; } if (maxItems >= 0) { this["-m"] = maxItems.ToString(); } } } /// /// Users command options /// public class UsersCmdOptions : Options { /// /// Users command options. /// /// /// /// /// ///
p4 help users ///
///
users -- List Perforce users ///
///
p4 users [-l -a -r -c] [-m max] [user ...] ///
///
Lists all Perforce users or users that match the 'user' argument. ///
The report includes the last time that each user accessed the system. ///
///
The -m max flag limits output to the first 'max' number of users. ///
///
The -a flag includes service and operator users in the output. ///
///
The -l flag includes additional information in the output. The -l ///
flag requires 'super' access, which is granted by 'p4 protect'. ///
///
The -r and -c flags are only allowed on replica servers. When ///
-r is given only users who have used a replica are reported and ///
when -c is given only the user information from the central server ///
is reported. Otherwise on a replica server, the user list will ///
be slightly different from the master server as the user access times ///
will reflect replica usage or master usage whichever is newer. ///
///
///
public UsersCmdOptions(UsersCmdFlags flags, int maxItems) : base(flags, maxItems) { } } /// /// Flags for the client command. /// [Flags] public enum ClientCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -d flag deletes the specified spec, as long as the client /// workspace has no opened files or pending changes. (See 'p4 help /// opened'.) The -f flag forces the delete. /// Delete = 0x0001, /// /// The -o flag writes the named client spec to the standard output. /// The user's editor is not invoked. /// Output = 0x0002, /// /// The -i flag reads a client spec from the standard input. The /// user's editor is not invoked. /// Input = 0x0004, /// /// The -f flag can force the updating of locked clients; normally /// locked clients can only be modified by their owner. -f also allows /// the last modified date to be set. The -f flag requires 'admin' /// access granted by 'p4 protect'. /// Force = 0x0008, /// /// The -s flag is used to switch an existing client spec's view without /// invoking the editor. It can be used with -S to switch to a stream /// view, or with -t to switch to a view defined in another client spec. /// Switching views is not allowed in a client that has opened files. /// The -f flag can be used with -s to force switching with opened files. /// View switching has no effect on files in a client workspace until /// 'p4 sync' is run. /// Switch = 0x0010 } public partial class Options { /// /// Client command options. /// /// /// /// ///
p4 help client ///
///
client -- Create or edit a client workspace specification and its view ///
workspace -- Synonym for 'client' ///
///
p4 client [-f -t template] [name] ///
p4 client -d [-f] name ///
p4 client -o [-t template] [name] ///
p4 client -S stream [[-c change] -o] [name] ///
p4 client -s [-f] -S stream [name] ///
p4 client -s [-f] -t template [name] ///
p4 client -i [-f] ///
///
Creates a new client specification ('spec') or edits an existing ///
spec. A client spec is a named mapping of depot files to workspace ///
files. ///
///
The 'p4 client' command puts the client spec into a temporary file ///
and invokes the editor configured by the environment variable ///
$P4EDITOR. For new workspaces, the client name defaults to the ///
$P4CLIENT environment variable, if set, or to the current host name. ///
Saving the file creates or modifies the client spec. ///
///
The client spec contains the following fields: ///
///
Client: The client name. ///
///
Host: If set, restricts access to the named host. ///
If unset, access is allowed from any host. ///
///
Owner: The user who created this client. ///
///
Update: The date that this spec was last modified. ///
///
Access: The date that this client was last used in any way. ///
///
Description: A short description of the workspace. ///
///
Root: The root directory of the workspace (specified in local ///
file system syntax), under which all versioned files ///
will be placed. If you change this setting, you must ///
physically relocate any files that currently reside ///
there. On Windows client machines, you can specify the ///
root as "null" to enable you to map files to multiple ///
drives. ///
///
AltRoots: Up to two optional alternate client workspace roots. ///
The first of the main and alternate roots to match the ///
client program's current working directory is used. If ///
none match, the main root is used. 'p4 info' displays ///
the root that is being used. ///
///
Options: Flags to configure the client behavior. Defaults ///
are marked with *. ///
///
allwrite Leaves all files writable on the client; ///
noallwrite * by default, only files opened by 'p4 edit' ///
are writable. If set, files might be clobbered ///
as a result of ignoring the clobber option ///
(see below). ///
///
clobber Permits 'p4 sync' to overwrite writable ///
noclobber * files on the client. noclobber is ignored if ///
allwrite is set. ///
///
compress Compresses data sent between the client ///
nocompress * and server to speed up slow connections. ///
///
locked Allows only the client owner to use or change ///
unlocked * the client spec. Prevents the client spec from ///
being deleted. ///
///
modtime Causes 'p4 sync' and 'p4 submit' to preserve ///
nomodtime * file modification time, as with files with the ///
+m type modifier. (See 'p4 help filetypes'.) ///
With nomodtime, file timestamps are updated by ///
sync and submit operations. ///
///
rmdir Makes 'p4 sync' attempt to delete a workspace ///
normdir * directory when all files in it are removed. ///
///
SubmitOptions: Flags to change submit behaviour. ///
///
submitunchanged All open files are submitted (default). ///
///
revertunchanged Files that have content or type changes ///
are submitted. Unchanged files are ///
reverted. ///
///
leaveunchanged Files that have content or type changes ///
are submitted. Unchanged files are moved ///
to the default changelist. ///
///
+reopen Can be appended to the submit option flag ///
to cause submitted files to be reopened in ///
the default changelist. ///
Example: submitunchanged+reopen ///
///
LineEnd: Set line-ending character(s) for client text files. ///
///
local mode that is native to the client (default). ///
unix linefeed: UNIX style. ///
mac carriage return: Macintosh style. ///
win carriage return-linefeed: Windows style. ///
share hybrid: writes UNIX style but reads UNIX, ///
Mac or Windows style. ///
///
View: Maps files in the depot to files in your client ///
workspace. Defines the files that you want in your ///
client workspace and specifies where you want them ///
to reside. The default view maps all depot files ///
onto the client. See 'p4 help views' for view syntax. ///
A new view takes effect on the next 'p4 sync'. ///
///
Stream: The stream to which this client's view will be dedicated. ///
(Files in stream paths can be submitted only by dedicated ///
stream clients.) When this optional field is set, the ///
View field will be automatically replaced by a stream ///
view as the client spec is saved. ///
///
Note: changing the client root does not actually move the client ///
files; you must relocate them manually. Similarly, changing ///
the 'LineEnd' option does not actually update the client files; ///
you can refresh them with 'p4 sync -f'. ///
///
The -d flag deletes the specified spec, as long as the client ///
workspace has no opened files or pending changes. (See 'p4 help ///
opened'.) The -f flag forces the delete. ///
///
The -o flag writes the named client spec to the standard output. ///
The user's editor is not invoked. ///
///
The -i flag reads a client spec from the standard input. The ///
user's editor is not invoked. ///
///
The -t template flag, where 'template' is the name of another client ///
spec, causes the View and Options fields to be replaced by those of ///
the template. ///
///
The -f flag can force the updating of locked clients; normally ///
locked clients can only be modified by their owner. -f also allows ///
the last modified date to be set. The -f flag requires 'admin' ///
access granted by 'p4 protect'. ///
///
The -s flag is used to switch an existing client spec's view without ///
invoking the editor. It can be used with -S to switch to a stream ///
view, or with -t to switch to a view defined in another client spec. ///
Switching views is not allowed in a client that has opened files. ///
The -f flag can be used with -s to force switching with opened files. ///
View switching has no effect on files in a client workspace until ///
'p4 sync' is run. ///
///
Without -s, the '-S stream' flag can be used to create a new client ///
spec dedicated to a stream. If the client spec already exists, and ///
-S is used without -s, it is ignored. ///
///
The '-S stream' flag can be used with '-o -c change' to inspect an ///
old stream client view. It yields the client spec that would have ///
been created for the stream at the moment the change was recorded. ///
///
///
///
public Options(ClientCmdFlags flags) : this(flags, null, null, -1) { } /// /// Client command options. /// /// /// /// /// /// /// ///
p4 help client ///
///
client -- Create or edit a client workspace specification and its view ///
workspace -- Synonym for 'client' ///
///
p4 client [-f -t template] [name] ///
p4 client -d [-f] name ///
p4 client -o [-t template] [name] ///
p4 client -S stream [[-c change] -o] [name] ///
p4 client -s [-f] -S stream [name] ///
p4 client -s [-f] -t template [name] ///
p4 client -i [-f] ///
///
Creates a new client specification ('spec') or edits an existing ///
spec. A client spec is a named mapping of depot files to workspace ///
files. ///
///
The 'p4 client' command puts the client spec into a temporary file ///
and invokes the editor configured by the environment variable ///
$P4EDITOR. For new workspaces, the client name defaults to the ///
$P4CLIENT environment variable, if set, or to the current host name. ///
Saving the file creates or modifies the client spec. ///
///
The client spec contains the following fields: ///
///
Client: The client name. ///
///
Host: If set, restricts access to the named host. ///
If unset, access is allowed from any host. ///
///
Owner: The user who created this client. ///
///
Update: The date that this spec was last modified. ///
///
Access: The date that this client was last used in any way. ///
///
Description: A short description of the workspace. ///
///
Root: The root directory of the workspace (specified in local ///
file system syntax), under which all versioned files ///
will be placed. If you change this setting, you must ///
physically relocate any files that currently reside ///
there. On Windows client machines, you can specify the ///
root as "null" to enable you to map files to multiple ///
drives. ///
///
AltRoots: Up to two optional alternate client workspace roots. ///
The first of the main and alternate roots to match the ///
client program's current working directory is used. If ///
none match, the main root is used. 'p4 info' displays ///
the root that is being used. ///
///
Options: Flags to configure the client behavior. Defaults ///
are marked with *. ///
///
allwrite Leaves all files writable on the client; ///
noallwrite * by default, only files opened by 'p4 edit' ///
are writable. If set, files might be clobbered ///
as a result of ignoring the clobber option ///
(see below). ///
///
clobber Permits 'p4 sync' to overwrite writable ///
noclobber * files on the client. noclobber is ignored if ///
allwrite is set. ///
///
compress Compresses data sent between the client ///
nocompress * and server to speed up slow connections. ///
///
locked Allows only the client owner to use or change ///
unlocked * the client spec. Prevents the client spec from ///
being deleted. ///
///
modtime Causes 'p4 sync' and 'p4 submit' to preserve ///
nomodtime * file modification time, as with files with the ///
+m type modifier. (See 'p4 help filetypes'.) ///
With nomodtime, file timestamps are updated by ///
sync and submit operations. ///
///
rmdir Makes 'p4 sync' attempt to delete a workspace ///
normdir * directory when all files in it are removed. ///
///
SubmitOptions: Flags to change submit behaviour. ///
///
submitunchanged All open files are submitted (default). ///
///
revertunchanged Files that have content or type changes ///
are submitted. Unchanged files are ///
reverted. ///
///
leaveunchanged Files that have content or type changes ///
are submitted. Unchanged files are moved ///
to the default changelist. ///
///
+reopen Can be appended to the submit option flag ///
to cause submitted files to be reopened in ///
the default changelist. ///
Example: submitunchanged+reopen ///
///
LineEnd: Set line-ending character(s) for client text files. ///
///
local mode that is native to the client (default). ///
unix linefeed: UNIX style. ///
mac carriage return: Macintosh style. ///
win carriage return-linefeed: Windows style. ///
share hybrid: writes UNIX style but reads UNIX, ///
Mac or Windows style. ///
///
View: Maps files in the depot to files in your client ///
workspace. Defines the files that you want in your ///
client workspace and specifies where you want them ///
to reside. The default view maps all depot files ///
onto the client. See 'p4 help views' for view syntax. ///
A new view takes effect on the next 'p4 sync'. ///
///
Stream: The stream to which this client's view will be dedicated. ///
(Files in stream paths can be submitted only by dedicated ///
stream clients.) When this optional field is set, the ///
View field will be automatically replaced by a stream ///
view as the client spec is saved. ///
///
Note: changing the client root does not actually move the client ///
files; you must relocate them manually. Similarly, changing ///
the 'LineEnd' option does not actually update the client files; ///
you can refresh them with 'p4 sync -f'. ///
///
The -d flag deletes the specified spec, as long as the client ///
workspace has no opened files or pending changes. (See 'p4 help ///
opened'.) The -f flag forces the delete. ///
///
The -o flag writes the named client spec to the standard output. ///
The user's editor is not invoked. ///
///
The -i flag reads a client spec from the standard input. The ///
user's editor is not invoked. ///
///
The -t template flag, where 'template' is the name of another client ///
spec, causes the View and Options fields to be replaced by those of ///
the template. ///
///
The -f flag can force the updating of locked clients; normally ///
locked clients can only be modified by their owner. -f also allows ///
the last modified date to be set. The -f flag requires 'admin' ///
access granted by 'p4 protect'. ///
///
The -s flag is used to switch an existing client spec's view without ///
invoking the editor. It can be used with -S to switch to a stream ///
view, or with -t to switch to a view defined in another client spec. ///
Switching views is not allowed in a client that has opened files. ///
The -f flag can be used with -s to force switching with opened files. ///
View switching has no effect on files in a client workspace until ///
'p4 sync' is run. ///
///
Without -s, the '-S stream' flag can be used to create a new client ///
spec dedicated to a stream. If the client spec already exists, and ///
-S is used without -s, it is ignored. ///
///
The '-S stream' flag can be used with '-o -c change' to inspect an ///
old stream client view. It yields the client spec that would have ///
been created for the stream at the moment the change was recorded. ///
///
///
///
public Options(ClientCmdFlags flags, string template, string stream, int change) { if ((flags & ClientCmdFlags.Output) != 0) { this["-o"] = null; } if ((flags & ClientCmdFlags.Input) != 0) { this["-i"] = null; } if ((flags & ClientCmdFlags.Delete) != 0) { this["-d"] = null; } if ((flags & ClientCmdFlags.Force) != 0) { this["-f"] = null; } if ((flags & ClientCmdFlags.Switch) != 0) { this["-s"] = null; } if (String.IsNullOrEmpty(template) != true) { this["-t"] = template; } if (String.IsNullOrEmpty(stream) != true) { this["-S"] = stream; } if (change > 0) { this["-c"] = change.ToString(); } } } /// /// Client command options /// public class ClientCmdOptions : Options { /// /// Client command options. /// /// /// /// ///
p4 help client ///
///
client -- Create or edit a client workspace specification and its view ///
workspace -- Synonym for 'client' ///
///
p4 client [-f -t template] [name] ///
p4 client -d [-f] name ///
p4 client -o [-t template] [name] ///
p4 client -S stream [[-c change] -o] [name] ///
p4 client -s [-f] -S stream [name] ///
p4 client -s [-f] -t template [name] ///
p4 client -i [-f] ///
///
Creates a new client specification ('spec') or edits an existing ///
spec. A client spec is a named mapping of depot files to workspace ///
files. ///
///
The 'p4 client' command puts the client spec into a temporary file ///
and invokes the editor configured by the environment variable ///
$P4EDITOR. For new workspaces, the client name defaults to the ///
$P4CLIENT environment variable, if set, or to the current host name. ///
Saving the file creates or modifies the client spec. ///
///
The client spec contains the following fields: ///
///
Client: The client name. ///
///
Host: If set, restricts access to the named host. ///
If unset, access is allowed from any host. ///
///
Owner: The user who created this client. ///
///
Update: The date that this spec was last modified. ///
///
Access: The date that this client was last used in any way. ///
///
Description: A short description of the workspace. ///
///
Root: The root directory of the workspace (specified in local ///
file system syntax), under which all versioned files ///
will be placed. If you change this setting, you must ///
physically relocate any files that currently reside ///
there. On Windows client machines, you can specify the ///
root as "null" to enable you to map files to multiple ///
drives. ///
///
AltRoots: Up to two optional alternate client workspace roots. ///
The first of the main and alternate roots to match the ///
client program's current working directory is used. If ///
none match, the main root is used. 'p4 info' displays ///
the root that is being used. ///
///
Options: Flags to configure the client behavior. Defaults ///
are marked with *. ///
///
allwrite Leaves all files writable on the client; ///
noallwrite * by default, only files opened by 'p4 edit' ///
are writable. If set, files might be clobbered ///
as a result of ignoring the clobber option ///
(see below). ///
///
clobber Permits 'p4 sync' to overwrite writable ///
noclobber * files on the client. noclobber is ignored if ///
allwrite is set. ///
///
compress Compresses data sent between the client ///
nocompress * and server to speed up slow connections. ///
///
locked Allows only the client owner to use or change ///
unlocked * the client spec. Prevents the client spec from ///
being deleted. ///
///
modtime Causes 'p4 sync' and 'p4 submit' to preserve ///
nomodtime * file modification time, as with files with the ///
+m type modifier. (See 'p4 help filetypes'.) ///
With nomodtime, file timestamps are updated by ///
sync and submit operations. ///
///
rmdir Makes 'p4 sync' attempt to delete a workspace ///
normdir * directory when all files in it are removed. ///
///
SubmitOptions: Flags to change submit behaviour. ///
///
submitunchanged All open files are submitted (default). ///
///
revertunchanged Files that have content or type changes ///
are submitted. Unchanged files are ///
reverted. ///
///
leaveunchanged Files that have content or type changes ///
are submitted. Unchanged files are moved ///
to the default changelist. ///
///
+reopen Can be appended to the submit option flag ///
to cause submitted files to be reopened in ///
the default changelist. ///
Example: submitunchanged+reopen ///
///
LineEnd: Set line-ending character(s) for client text files. ///
///
local mode that is native to the client (default). ///
unix linefeed: UNIX style. ///
mac carriage return: Macintosh style. ///
win carriage return-linefeed: Windows style. ///
share hybrid: writes UNIX style but reads UNIX, ///
Mac or Windows style. ///
///
View: Maps files in the depot to files in your client ///
workspace. Defines the files that you want in your ///
client workspace and specifies where you want them ///
to reside. The default view maps all depot files ///
onto the client. See 'p4 help views' for view syntax. ///
A new view takes effect on the next 'p4 sync'. ///
///
Stream: The stream to which this client's view will be dedicated. ///
(Files in stream paths can be submitted only by dedicated ///
stream clients.) When this optional field is set, the ///
View field will be automatically replaced by a stream ///
view as the client spec is saved. ///
///
Note: changing the client root does not actually move the client ///
files; you must relocate them manually. Similarly, changing ///
the 'LineEnd' option does not actually update the client files; ///
you can refresh them with 'p4 sync -f'. ///
///
The -d flag deletes the specified spec, as long as the client ///
workspace has no opened files or pending changes. (See 'p4 help ///
opened'.) The -f flag forces the delete. ///
///
The -o flag writes the named client spec to the standard output. ///
The user's editor is not invoked. ///
///
The -i flag reads a client spec from the standard input. The ///
user's editor is not invoked. ///
///
The -t template flag, where 'template' is the name of another client ///
spec, causes the View and Options fields to be replaced by those of ///
the template. ///
///
The -f flag can force the updating of locked clients; normally ///
locked clients can only be modified by their owner. -f also allows ///
the last modified date to be set. The -f flag requires 'admin' ///
access granted by 'p4 protect'. ///
///
The -s flag is used to switch an existing client spec's view without ///
invoking the editor. It can be used with -S to switch to a stream ///
view, or with -t to switch to a view defined in another client spec. ///
Switching views is not allowed in a client that has opened files. ///
The -f flag can be used with -s to force switching with opened files. ///
View switching has no effect on files in a client workspace until ///
'p4 sync' is run. ///
///
Without -s, the '-S stream' flag can be used to create a new client ///
spec dedicated to a stream. If the client spec already exists, and ///
-S is used without -s, it is ignored. ///
///
The '-S stream' flag can be used with '-o -c change' to inspect an ///
old stream client view. It yields the client spec that would have ///
been created for the stream at the moment the change was recorded. ///
///
///
///
public ClientCmdOptions(ClientCmdFlags flags) : base(flags, null, null, -1) { } /// /// Client command options. /// /// /// /// ///
p4 help client ///
///
client -- Create or edit a client workspace specification and its view ///
workspace -- Synonym for 'client' ///
///
p4 client [-f -t template] [name] ///
p4 client -d [-f] name ///
p4 client -o [-t template] [name] ///
p4 client -S stream [[-c change] -o] [name] ///
p4 client -s [-f] -S stream [name] ///
p4 client -s [-f] -t template [name] ///
p4 client -i [-f] ///
///
Creates a new client specification ('spec') or edits an existing ///
spec. A client spec is a named mapping of depot files to workspace ///
files. ///
///
The 'p4 client' command puts the client spec into a temporary file ///
and invokes the editor configured by the environment variable ///
$P4EDITOR. For new workspaces, the client name defaults to the ///
$P4CLIENT environment variable, if set, or to the current host name. ///
Saving the file creates or modifies the client spec. ///
///
The client spec contains the following fields: ///
///
Client: The client name. ///
///
Host: If set, restricts access to the named host. ///
If unset, access is allowed from any host. ///
///
Owner: The user who created this client. ///
///
Update: The date that this spec was last modified. ///
///
Access: The date that this client was last used in any way. ///
///
Description: A short description of the workspace. ///
///
Root: The root directory of the workspace (specified in local ///
file system syntax), under which all versioned files ///
will be placed. If you change this setting, you must ///
physically relocate any files that currently reside ///
there. On Windows client machines, you can specify the ///
root as "null" to enable you to map files to multiple ///
drives. ///
///
AltRoots: Up to two optional alternate client workspace roots. ///
The first of the main and alternate roots to match the ///
client program's current working directory is used. If ///
none match, the main root is used. 'p4 info' displays ///
the root that is being used. ///
///
Options: Flags to configure the client behavior. Defaults ///
are marked with *. ///
///
allwrite Leaves all files writable on the client; ///
noallwrite * by default, only files opened by 'p4 edit' ///
are writable. If set, files might be clobbered ///
as a result of ignoring the clobber option ///
(see below). ///
///
clobber Permits 'p4 sync' to overwrite writable ///
noclobber * files on the client. noclobber is ignored if ///
allwrite is set. ///
///
compress Compresses data sent between the client ///
nocompress * and server to speed up slow connections. ///
///
locked Allows only the client owner to use or change ///
unlocked * the client spec. Prevents the client spec from ///
being deleted. ///
///
modtime Causes 'p4 sync' and 'p4 submit' to preserve ///
nomodtime * file modification time, as with files with the ///
+m type modifier. (See 'p4 help filetypes'.) ///
With nomodtime, file timestamps are updated by ///
sync and submit operations. ///
///
rmdir Makes 'p4 sync' attempt to delete a workspace ///
normdir * directory when all files in it are removed. ///
///
SubmitOptions: Flags to change submit behaviour. ///
///
submitunchanged All open files are submitted (default). ///
///
revertunchanged Files that have content or type changes ///
are submitted. Unchanged files are ///
reverted. ///
///
leaveunchanged Files that have content or type changes ///
are submitted. Unchanged files are moved ///
to the default changelist. ///
///
+reopen Can be appended to the submit option flag ///
to cause submitted files to be reopened in ///
the default changelist. ///
Example: submitunchanged+reopen ///
///
LineEnd: Set line-ending character(s) for client text files. ///
///
local mode that is native to the client (default). ///
unix linefeed: UNIX style. ///
mac carriage return: Macintosh style. ///
win carriage return-linefeed: Windows style. ///
share hybrid: writes UNIX style but reads UNIX, ///
Mac or Windows style. ///
///
View: Maps files in the depot to files in your client ///
workspace. Defines the files that you want in your ///
client workspace and specifies where you want them ///
to reside. The default view maps all depot files ///
onto the client. See 'p4 help views' for view syntax. ///
A new view takes effect on the next 'p4 sync'. ///
///
Stream: The stream to which this client's view will be dedicated. ///
(Files in stream paths can be submitted only by dedicated ///
stream clients.) When this optional field is set, the ///
View field will be automatically replaced by a stream ///
view as the client spec is saved. ///
///
Note: changing the client root does not actually move the client ///
files; you must relocate them manually. Similarly, changing ///
the 'LineEnd' option does not actually update the client files; ///
you can refresh them with 'p4 sync -f'. ///
///
The -d flag deletes the specified spec, as long as the client ///
workspace has no opened files or pending changes. (See 'p4 help ///
opened'.) The -f flag forces the delete. ///
///
The -o flag writes the named client spec to the standard output. ///
The user's editor is not invoked. ///
///
The -i flag reads a client spec from the standard input. The ///
user's editor is not invoked. ///
///
The -t template flag, where 'template' is the name of another client ///
spec, causes the View and Options fields to be replaced by those of ///
the template. ///
///
The -f flag can force the updating of locked clients; normally ///
locked clients can only be modified by their owner. -f also allows ///
the last modified date to be set. The -f flag requires 'admin' ///
access granted by 'p4 protect'. ///
///
The -s flag is used to switch an existing client spec's view without ///
invoking the editor. It can be used with -S to switch to a stream ///
view, or with -t to switch to a view defined in another client spec. ///
Switching views is not allowed in a client that has opened files. ///
The -f flag can be used with -s to force switching with opened files. ///
View switching has no effect on files in a client workspace until ///
'p4 sync' is run. ///
///
Without -s, the '-S stream' flag can be used to create a new client ///
spec dedicated to a stream. If the client spec already exists, and ///
-S is used without -s, it is ignored. ///
///
The '-S stream' flag can be used with '-o -c change' to inspect an ///
old stream client view. It yields the client spec that would have ///
been created for the stream at the moment the change was recorded. ///
///
///
///
public ClientCmdOptions(ClientCmdFlags flags, string template, string stream, int change) : base(flags, template, stream, change) { } } /// /// Flags for the clients command. /// [Flags] public enum ClientsCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -t flag displays the time as well as the date. /// IncludeTime = 0x0001, /// /// The -e nameFilter flag lists workspaces with a name that matches /// the nameFilter pattern, for example: -e 'svr-dev-rel*'. -E makes /// the matching case-insensitive. /// IgnoreCase = 0x0002 } public partial class Options { /// /// Clients command options. /// /// /// /// /// /// /// /// ///
p4 help clients ///
///
clients -- Display list of clients ///
workspaces -- synonym for 'clients' ///
///
p4 clients [-t] [-u user] [[-e|-E] nameFilter -m max] [-S stream] ///
///
Lists all client workspaces currently defined in the server. ///
///
The -t flag displays the time as well as the date. ///
///
The -u user flag lists client workspaces that are owned by the ///
specified user. ///
///
The -e nameFilter flag lists workspaces with a name that matches ///
the nameFilter pattern, for example: -e 'svr-dev-rel*'. -E makes ///
the matching case-insensitive. ///
///
The -m max flag limits output to the specified number of workspaces. ///
///
The -S stream flag limits output to the client workspaces dedicated ///
to the stream. ///
///
///
///
public Options(ClientsCmdFlags flags, string userName, string nameFilter, int maxItems, string stream) { if ((flags & ClientsCmdFlags.IncludeTime) != 0) { this["-t"] = null; } if (String.IsNullOrEmpty(userName) != true) { this["-u"] = userName; } if (String.IsNullOrEmpty(nameFilter) != true) { if ((flags & ClientsCmdFlags.IgnoreCase) != 0) { this["-E"] = nameFilter; } else { this["-e"] = nameFilter; } } if (maxItems >= 0) { this["-m"] = maxItems.ToString(); } if (String.IsNullOrEmpty(stream) != true) { this["-S"] = stream; } } } /// /// Clients command options /// public class ClientsCmdOptions : Options { /// /// Clients command options. /// /// /// /// /// /// /// /// ///
p4 help clients ///
///
clients -- Display list of clients ///
workspaces -- synonym for 'clients' ///
///
p4 clients [-t] [-u user] [[-e|-E] nameFilter -m max] [-S stream] ///
///
Lists all client workspaces currently defined in the server. ///
///
The -t flag displays the time as well as the date. ///
///
The -u user flag lists client workspaces that are owned by the ///
specified user. ///
///
The -e nameFilter flag lists workspaces with a name that matches ///
the nameFilter pattern, for example: -e 'svr-dev-rel*'. -E makes ///
the matching case-insensitive. ///
///
The -m max flag limits output to the specified number of workspaces. ///
///
The -S stream flag limits output to the client workspaces dedicated ///
to the stream. ///
///
///
///
public ClientsCmdOptions(ClientsCmdFlags flags, string userName, string nameFilter, int maxItems, string stream) : base(flags, userName, nameFilter, maxItems, stream) { } } /// /// Flags for the change command. /// [Flags] public enum ChangeCmdFlags { /// /// No flags. /// None = 0x0000, /// /// 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. /// Delete = 0x0001, /// /// The -o flag writes the changelist specification to the standard /// output. The user's editor is not invoked. /// Output = 0x0002, /// /// The -i flag reads a changelist specification from the standard /// input. The user's editor is not invoked. /// Input = 0x0004, /// /// 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. The -f flag requires 'admin' access granted by 'p4 /// protect'. The -f and -u flags are mutually exclusive. /// Force = 0x0008, /// /// 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. /// Update = 0x0010, /// /// 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. /// IncludeJobs = 0x0020 } public partial class Options { /// /// Change command options. /// /// /// /// ///
p4 help change ///
///
change -- Create or edit a changelist description ///
changelist -- synonym for 'change' ///
///
p4 change [-s] [-f | -u] [changelist#] ///
p4 change -d [-f -s] changelist# ///
p4 change -o [-s] [-f] [changelist#] ///
p4 change -i [-s] [-f | -u] ///
p4 change -t restricted | public [-f | -u] 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. 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 -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. ///
///
///
public Options(ChangeCmdFlags flags) : this(flags, ChangeListType.None) { } /// /// Change command options. /// /// /// /// /// ///
p4 help change ///
///
change -- Create or edit a changelist description ///
changelist -- synonym for 'change' ///
///
p4 change [-s] [-f | -u] [changelist#] ///
p4 change -d [-f -s] changelist# ///
p4 change -o [-s] [-f] [changelist#] ///
p4 change -i [-s] [-f | -u] ///
p4 change -t restricted | public [-f | -u] 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. 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 -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. ///
///
///
public Options(ChangeCmdFlags flags, ChangeListType newType) { if ((flags & ChangeCmdFlags.Output) != 0) { this["-o"] = null; } if ((flags & ChangeCmdFlags.Input) != 0) { this["-i"] = null; } if ((flags & ChangeCmdFlags.Delete) != 0) { this["-d"] = null; } if (newType != ChangeListType.None) { this["-t"] = new StringEnum(newType).ToString(); } if ((flags & ChangeCmdFlags.IncludeJobs) != 0) { this["-s"] = null; } if ((flags & ChangeCmdFlags.Force) != 0) { this["-f"] = null; } else if ((flags & ChangeCmdFlags.Update) != 0) { this["-u"] = null; } } } /// /// Change command options. /// public class ChangeCmdOptions : Options { /// /// Change command options. /// /// /// /// ///
p4 help change ///
///
change -- Create or edit a changelist description ///
changelist -- synonym for 'change' ///
///
p4 change [-s] [-f | -u] [changelist#] ///
p4 change -d [-f -s] changelist# ///
p4 change -o [-s] [-f] [changelist#] ///
p4 change -i [-s] [-f | -u] ///
p4 change -t restricted | public [-f | -u] 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. 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 -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. ///
///
///
public ChangeCmdOptions(ChangeCmdFlags flags) : base(flags, ChangeListType.None) { } /// /// Change command options. /// /// /// /// /// ///
p4 help change ///
///
change -- Create or edit a changelist description ///
changelist -- synonym for 'change' ///
///
p4 change [-s] [-f | -u] [changelist#] ///
p4 change -d [-f -s] changelist# ///
p4 change -o [-s] [-f] [changelist#] ///
p4 change -i [-s] [-f | -u] ///
p4 change -t restricted | public [-f | -u] 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. 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 -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. ///
///
///
public ChangeCmdOptions(ChangeCmdFlags flags, ChangeListType newType) :base(flags, newType) {} } /// /// Flags for the changes command. /// [Flags] public enum ChangesCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -i flag also includes any changelists integrated into the /// specified files. /// IncludeIntegrated = 0x0001, /// /// The -t flag displays the time as well as the date. /// IncludeTime = 0x0002, /// /// The -l flag displays the full text of the changelist /// descriptions. /// FullDescription = 0x0004, /// /// The -L flag displays the changelist descriptions, truncated to 250 /// characters if longer. /// LongDescription = 0x0008, /// /// The -f flag enables admin users to view restricted changes. /// ViewRestricted = 0x0010 } /// /// Flags for the status of a changelist. /// [Flags] public enum ChangeListStatus { /// /// No status specified. /// None = 0x0000, /// /// Pending changelist. /// Pending = 0x0001, /// /// Shelved changelist. /// Shelved = 0x0002, /// /// Submitted changelist. /// Submitted = 0x0004 } public partial class Options { /// /// Changes command options. /// /// /// /// /// /// /// /// ///
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. ///
///
///
public Options(ChangesCmdFlags flags, string clientName, int maxItems, ChangeListStatus status, string userName) { if ((flags & ChangesCmdFlags.IncludeIntegrated) != 0) { this["-i"] = null; } if ((flags & ChangesCmdFlags.IncludeTime) != 0) { this["-t"] = null; } if ((flags & ChangesCmdFlags.FullDescription) != 0) { this["-l"] = null; } if ((flags & ChangesCmdFlags.LongDescription) != 0) { this["-L"] = null; } if ((flags & ChangesCmdFlags.ViewRestricted) != 0) { this["-f"] = null; } if (String.IsNullOrEmpty(clientName) != true) { this["-c"] = clientName; } if (maxItems >= 0) { this["-m"] = maxItems.ToString(); } if (status != ChangeListStatus.None) { this["-s"] = new StringEnum(status).ToString(StringEnumCase.Lower); ; } if (String.IsNullOrEmpty(userName) != true) { this["-u"] = userName; } } } /// /// Changes command options. /// public class ChangesCmdOptions : Options { /// /// Changes command options. /// /// /// /// /// /// /// /// ///
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. ///
///
///
public ChangesCmdOptions(ChangesCmdFlags flags, string clientName, int maxItems, ChangeListStatus status, string userName) :base(flags, clientName, maxItems, status, userName) { } } /// /// Flags for the group command. /// [Flags] public enum GroupCmdFlags { /// /// No flags. /// None = 0x0000, /// /// 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. /// Delete = 0x0001, /// /// The -o flag writes the changelist specification to the standard /// output. The user's editor is not invoked. /// Output = 0x0002, /// /// The -i flag reads a changelist specification from the standard /// input. The user's editor is not invoked. /// Input = 0x0004, /// /// The -a flag enables a user without 'super' access to modify the group /// if that user is an 'owner' of that group. Group owners are specified /// in the 'Owners' field of the group spec. /// OwnerAccess = 0x0008, /// /// The -A flag enables a user with 'admin' access to add a new group. /// Existing groups may not be modified when this flag is used. /// AdminAdd = 0x0010 } public partial class Options { /// /// Group command options. /// /// /// /// ///
p4 help group ///
///
group -- Change members of user group ///
///
p4 group [-a] name ///
p4 group -d [-a] name ///
p4 group -o name ///
p4 group -i [-a] ///
///
Create a group or modify the membership of an existing group. ///
A group can contain users and other groups. The group specification ///
is put into a temporary file and the editor (configured by the ///
environment variable $P4EDITOR) is invoked. ///
///
A group exists when it has any users or other groups in it, and ///
ceases to exist if all users and groups in it are removed. ///
///
Each group has MaxResults, MaxScanRows, and MaxLockTime fields, ///
which limit the resources committed to operations performed by ///
members of the group. For these fields, 'unlimited' or 'unset' ///
means no limit for that group. An individual user's limit is the ///
highest of any group with a limit to which he belongs, unlimited if ///
any of his groups has 'unlimited' for that field, or unlimited ///
if he belongs to no group with a limit. See 'p4 help maxresults' ///
for more information on MaxResults, MaxScanRows and MaxLockTime. ///
///
Each group also has a Timeout field, which specifies how long (in ///
seconds) a 'p4 login' ticket remains valid. A value of 'unset' or ///
'unlimited' is equivalent to no timeout. An individual's timeout is ///
the highest of any group with a limit to which he belongs, unlimited ///
if any of his groups has 'unlimited' for the timeout value, or ///
unlimited if he belongs to no group with a limit. See 'p4 help login' ///
for more information. ///
///
Each group has a PasswordTimeout field, which determines how long a ///
password remains valid for members of the group. ///
///
The -d flag deletes a group. ///
///
The -o flag writes the group specification to standard output. The ///
user's editor is not invoked. ///
///
The -i flag reads a group specification from standard input. The ///
user's editor is not invoked. The new group specification replaces ///
the previous one. ///
///
The -a flag enables a user without 'super' access to modify the group ///
if that user is an 'owner' of that group. Group owners are specified ///
in the 'Owners' field of the group spec. ///
///
The -A flag enables a user with 'admin' access to add a new group. ///
Existing groups may not be modified when this flag is used. ///
///
All commands that require access granted by 'p4 protect' consider a ///
user's groups when calculating access levels. ///
///
'p4 group' requires 'super' access granted by 'p4 protect' unless ///
invoked with the '-a' flag by a qualified user. ///
///
///
public Options(GroupCmdFlags flags) { if ((flags & GroupCmdFlags.Output) != 0) { this["-o"] = null; } if ((flags & GroupCmdFlags.Input) != 0) { this["-i"] = null; } if ((flags & GroupCmdFlags.Delete) != 0) { this["-d"] = null; } if ((flags & GroupCmdFlags.OwnerAccess) != 0) { this["-a"] = null; } if ((flags & GroupCmdFlags.AdminAdd) != 0) { this["-A"] = null; } } } /// /// Group command options. /// public class GroupCmdOptions : Options { /// /// Group command options. /// /// /// /// ///
p4 help group ///
///
group -- Change members of user group ///
///
p4 group [-a] name ///
p4 group -d [-a] name ///
p4 group -o name ///
p4 group -i [-a] ///
///
Create a group or modify the membership of an existing group. ///
A group can contain users and other groups. The group specification ///
is put into a temporary file and the editor (configured by the ///
environment variable $P4EDITOR) is invoked. ///
///
A group exists when it has any users or other groups in it, and ///
ceases to exist if all users and groups in it are removed. ///
///
Each group has MaxResults, MaxScanRows, and MaxLockTime fields, ///
which limit the resources committed to operations performed by ///
members of the group. For these fields, 'unlimited' or 'unset' ///
means no limit for that group. An individual user's limit is the ///
highest of any group with a limit to which he belongs, unlimited if ///
any of his groups has 'unlimited' for that field, or unlimited ///
if he belongs to no group with a limit. See 'p4 help maxresults' ///
for more information on MaxResults, MaxScanRows and MaxLockTime. ///
///
Each group also has a Timeout field, which specifies how long (in ///
seconds) a 'p4 login' ticket remains valid. A value of 'unset' or ///
'unlimited' is equivalent to no timeout. An individual's timeout is ///
the highest of any group with a limit to which he belongs, unlimited ///
if any of his groups has 'unlimited' for the timeout value, or ///
unlimited if he belongs to no group with a limit. See 'p4 help login' ///
for more information. ///
///
Each group has a PasswordTimeout field, which determines how long a ///
password remains valid for members of the group. ///
///
The -d flag deletes a group. ///
///
The -o flag writes the group specification to standard output. The ///
user's editor is not invoked. ///
///
The -i flag reads a group specification from standard input. The ///
user's editor is not invoked. The new group specification replaces ///
the previous one. ///
///
The -a flag enables a user without 'super' access to modify the group ///
if that user is an 'owner' of that group. Group owners are specified ///
in the 'Owners' field of the group spec. ///
///
All commands that require access granted by 'p4 protect' consider a ///
user's groups when calculating access levels. ///
///
'p4 group' requires 'super' access granted by 'p4 protect' unless ///
invoked with the '-a' flag by a qualified user. ///
///
///
public GroupCmdOptions(GroupCmdFlags flags) : base(flags) { } } /// /// Flags for the groups command. /// [Flags] public enum GroupsCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -i flag also displays groups that the user or group belongs to /// indirectly by means of membership in subgroups. /// (The group parameter for the command can be a user or group name) /// IncludeIndirect = 0x0001, /// /// The -v flag displays the MaxResults, MaxScanRows, MaxLockTime, and /// Timeout values for the specified group. /// IncludeAllValues = 0x0002, } public partial class Options { /// /// Groups command options. /// /// /// /// /// ///
p4 help groups ///
///
groups -- List groups (of users) ///
///
p4 groups [-m max] [[[-i] user | group] | [-v [group]]] ///
///
List all user groups defined in the server. If a user argument is, ///
specified, only groups containing that user are displayed. If a group ///
argument is specified, only groups containing the group are displayed. ///
///
The -i flag also displays groups that the user or group belongs to ///
indirectly by means of membership in subgroups. ///
///
The -m max flag limits output to the specified number of groups. ///
///
The -v flag displays the MaxResults, MaxScanRows, MaxLockTime, and ///
Timeout values for the specified group. ///
///
///
public Options(GroupsCmdFlags flags, int maxItems) { if (maxItems >= 0) { this["-m"] = maxItems.ToString(); } if ((flags & GroupsCmdFlags.IncludeIndirect) != 0) { this["-i"] = null; } if ((flags & GroupsCmdFlags.IncludeAllValues) != 0) { this["-v"] = null; } } } /// /// Groups command options. /// public class GroupsCmdOptions : Options { public GroupsCmdOptions(GroupsCmdFlags flags, int maxItems) : base(flags, maxItems) { } } /// /// Flags for the job command. /// [Flags] public enum JobCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -d flag deletes the specified job. You cannot delete a job if /// it has pending or submitted fixes associated with it. /// Delete = 0x0001, /// /// The -o flag writes the job specification to the standard output. /// The user's editor is not invoked. /// Output = 0x0002, /// /// The -i flag reads a job specification from the standard input. The /// user's editor is not invoked. /// Input = 0x0004, /// /// The -f flag enables you set fields that are read-only by default. /// The -f flag requires 'admin' access, which is granted using the /// 'p4 protect' command. /// Force = 0x0008, } public partial class Options { /// /// Options for job command. /// /// /// /// ///
p4 help job ///
///
job -- Create or edit a job (defect) specification ///
///
p4 job [-f] [jobName] ///
p4 job -d jobName ///
p4 job -o [jobName] ///
p4 job -i [-f] ///
///
The 'p4 job' command creates and edits job specifications using an ///
ASCII form. A job is a defect, enhancement, or other unit of ///
intended work.The 'p4 fix' command associates changelists with jobs. ///
///
With no arguments, 'p4 job' creates an empty job specification ///
and invokes the user's editor. When the specification is saved, ///
a job name of the form jobNNNNNN is assigned. If the jobName ///
parameter is specified on the command line, the job is created or ///
opened for editing. ///
///
As jobs are entered or updated, all fields are indexed for searching ///
Text fields are broken into individual alphanumeric words (punctuation ///
and whitespace are ignored) and each word is case-folded and entered ///
into the word index. Date fields are converted to an internal ///
representation (seconds since 1970/01/01 00:00:00) and entered ///
into the date index. ///
///
The fields that compose a job are defined by the 'p4 jobspec' command. ///
Perforce provides a default job specification that you can edit. ///
///
The -d flag deletes the specified job. You cannot delete a job if ///
it has pending or submitted fixes associated with it. ///
///
The -o flag writes the job specification to the standard output. ///
The user's editor is not invoked. ///
///
The -i flag reads a job specification from the standard input. The ///
user's editor is not invoked. ///
///
The -f flag enables you set fields that are read-only by default. ///
The -f flag requires 'admin' access, which is granted using the ///
'p4 protect' command. ///
///
///
public Options(JobCmdFlags flags) { if ((flags & JobCmdFlags.Output) != 0) { this["-o"] = null; } if ((flags & JobCmdFlags.Input) != 0) { this["-i"] = null; } if ((flags & JobCmdFlags.Delete) != 0) { this["-d"] = null; } if ((flags & JobCmdFlags.Force) != 0) { this["-f"] = null; } } } /// ///Job command options /// public class JobCmdOptions:Options { /// /// Options for job command. /// /// /// /// ///
p4 help job ///
///
job -- Create or edit a job (defect) specification ///
///
p4 job [-f] [jobName] ///
p4 job -d jobName ///
p4 job -o [jobName] ///
p4 job -i [-f] ///
///
The 'p4 job' command creates and edits job specifications using an ///
ASCII form. A job is a defect, enhancement, or other unit of ///
intended work.The 'p4 fix' command associates changelists with jobs. ///
///
With no arguments, 'p4 job' creates an empty job specification ///
and invokes the user's editor. When the specification is saved, ///
a job name of the form jobNNNNNN is assigned. If the jobName ///
parameter is specified on the command line, the job is created or ///
opened for editing. ///
///
As jobs are entered or updated, all fields are indexed for searching ///
Text fields are broken into individual alphanumeric words (punctuation ///
and whitespace are ignored) and each word is case-folded and entered ///
into the word index. Date fields are converted to an internal ///
representation (seconds since 1970/01/01 00:00:00) and entered ///
into the date index. ///
///
The fields that compose a job are defined by the 'p4 jobspec' command. ///
Perforce provides a default job specification that you can edit. ///
///
The -d flag deletes the specified job. You cannot delete a job if ///
it has pending or submitted fixes associated with it. ///
///
The -o flag writes the job specification to the standard output. ///
The user's editor is not invoked. ///
///
The -i flag reads a job specification from the standard input. The ///
user's editor is not invoked. ///
///
The -f flag enables you set fields that are read-only by default. ///
The -f flag requires 'admin' access, which is granted using the ///
'p4 protect' command. ///
///
///
JobCmdOptions(JobCmdFlags flags) :base(flags) {} } /// /// Flags for the jobs command. /// [Flags] public enum JobsCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -i flag includes any fixes made by changelists integrated into /// the specified files. /// IncludeIntegratedFixes = 0x0001, /// /// The -l flag produces long output with the full text of the job /// descriptions. /// LongDescriptions = 0x0002, /// /// The -r flag sorts the jobs in reverse order (by job name). /// ReverseSort = 0x0004, /// /// The -R flag rebuilds the jobs table and reindexes each job, which /// is necessary after upgrading to 98.2. 'p4 jobs -R' requires that /// that the user be an operator or have 'super' access granted by /// 'p4 protect'. /// RebuildJobsTable = 0x008, } public partial class Options { /// /// Jobs command options. /// /// /// /// /// /// ///
p4 help jobs ///
///
jobs -- Display list of jobs ///
///
p4 jobs [-e jobview -i -l -m max -r] [file[revRange] ...] ///
p4 jobs -R ///
///
Lists jobs in the server. If a file specification is included, fixes ///
for submitted changelists affecting the specified files are listed. ///
The file specification can include wildcards and a revision range. ///
See 'p4 help revisions' for details about specifying revisions. ///
///
The -e flag lists jobs matching the expression specified in the ///
jobview parameter. For a description of jobview syntax, see 'p4 help ///
jobview'. ///
///
The -i flag includes any fixes made by changelists integrated into ///
the specified files. ///
///
The -l flag produces long output with the full text of the job ///
descriptions. ///
///
The -m max flag limits the output to the first 'max' jobs, ordered ///
by their job name. ///
///
The -r flag sorts the jobs in reverse order (by job name). ///
///
The -R flag rebuilds the jobs table and reindexes each job, which ///
is necessary after upgrading to 98.2. 'p4 jobs -R' requires that ///
that the user be an operator or have 'super' access granted by ///
'p4 protect'. ///
///
///
public Options(JobsCmdFlags flags, string jobView, int maxItems) { if (String.IsNullOrEmpty(jobView) == false) { this["-e"] = jobView; } if ((flags & JobsCmdFlags.IncludeIntegratedFixes) != 0) { this["-i"] = null; } if ((flags & JobsCmdFlags.LongDescriptions) != 0) { this["-l"] = null; } if (maxItems >= 0) { this["-m"] = maxItems.ToString(); } if ((flags & JobsCmdFlags.ReverseSort) != 0) { this["-r"] = null; } if ((flags & JobsCmdFlags.RebuildJobsTable) != 0) { this["-R"] = null; } } } /// /// Jobs command options /// public class JobsCmdOptions : Options { /// /// Jobs command options. /// /// /// /// /// /// ///
p4 help jobs ///
///
jobs -- Display list of jobs ///
///
p4 jobs [-e jobview -i -l -m max -r] [file[revRange] ...] ///
p4 jobs -R ///
///
Lists jobs in the server. If a file specification is included, fixes ///
for submitted changelists affecting the specified files are listed. ///
The file specification can include wildcards and a revision range. ///
See 'p4 help revisions' for details about specifying revisions. ///
///
The -e flag lists jobs matching the expression specified in the ///
jobview parameter. For a description of jobview syntax, see 'p4 help ///
jobview'. ///
///
The -i flag includes any fixes made by changelists integrated into ///
the specified files. ///
///
The -l flag produces long output with the full text of the job ///
descriptions. ///
///
The -m max flag limits the output to the first 'max' jobs, ordered ///
by their job name. ///
///
The -r flag sorts the jobs in reverse order (by job name). ///
///
The -R flag rebuilds the jobs table and reindexes each job, which ///
is necessary after upgrading to 98.2. 'p4 jobs -R' requires that ///
that the user be an operator or have 'super' access granted by ///
'p4 protect'. ///
///
///
public JobsCmdOptions(JobsCmdFlags flags, string jobView, int maxItems) : base(flags, jobView, maxItems) { } } /// /// Flags for the files command. /// [Flags] public enum FilesCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -a flag displays all revisions within the specific range, rather /// than just the highest revision in the range. /// AllRevisions = 0x0001, /// /// The -A flag displays files in archive depots. /// IncludeArchives = 0x0002, } public partial class Options { /// /// Options for the files command. /// /// /// /// /// /// p4 help Files /// public Options(FilesCmdFlags flags, int maxItems) { if ((flags & FilesCmdFlags.AllRevisions) != 0) { this["-a"] = null; } if ((flags & FilesCmdFlags.IncludeArchives) != 0) { this["-A"] = null; } if (maxItems >= 0) { this["-m"] = maxItems.ToString(); } } } /// /// Files command options /// public class FilesCmdOptions : Options { /// /// Options for the files command. /// /// /// /// /// /// p4 help Files /// public FilesCmdOptions(FilesCmdFlags flags, int maxItems) : base(flags, maxItems) { } } /// /// Flags for the filelog command. /// [Flags] public enum FileLogCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -i flag, includes inherited file history. If a file was created by /// branching (using 'p4 integrate'), filelog lists the revisions of the /// file's ancestors up to the branch points that led to the specified /// revision. File history inherited by renaming (using 'p4 move') is /// always displayed regardless of whether -i is specified. /// IncludeInherited = 0x0001, /// /// The -h flag, displays file content history instead of file name /// history. The list includes revisions of other files that were /// branched or copied (using 'p4 integrate' and 'p4 resolve -at') to /// the specified revision. Revisions that were replaced by copying /// or branching are omitted, even if they are part of the history of /// the specified revision. /// DisplayContentHistory = 0x0002, /// /// The -t flag, displays the time as well as the date. /// IncludeTime = 0x0004, /// /// The -l flag lists the full text of the changelist descriptions. /// LongOutput = 0x0008, /// /// The -L flag lists the full text of the changelist descriptions, /// truncated to 250 characters if longer. /// TruncatedLongOutput = 0x0010, /// /// The -s flag displays a shortened form of filelog that omits /// non-contributory integrations. /// ShortForm = 0x0020 }; public partial class Options { /// /// Options for the filelog command. /// public Options(FileLogCmdFlags flags, int changelistId, int maxItems) { if (changelistId >= 0) { this["-c"] = changelistId.ToString(); } if ((flags & FileLogCmdFlags.IncludeInherited) != 0) { this["-i"] = null; } if ((flags & FileLogCmdFlags.DisplayContentHistory) != 0) { this["-h"] = null; } if ((flags & FileLogCmdFlags.LongOutput) != 0) { this["-l"] = null; } if ((flags & FileLogCmdFlags.TruncatedLongOutput) != 0) { this["-L"] = null; } if ((flags & FileLogCmdFlags.IncludeTime) != 0) { this["-t"] = null; } if (maxItems >= 0) { this["-m"] = maxItems.ToString(); } if ((flags & FileLogCmdFlags.ShortForm) != 0) { this["-s"] = null; } } } /// /// Options for the filelog command. /// public class FilelogCmdOptions : Options { /// /// Options for the filelog command. /// public FilelogCmdOptions(FileLogCmdFlags flags, int changelistId, int maxItems) : base(flags, changelistId, maxItems) {} } /// /// Flags for the login command. /// [Flags] public enum LoginCmdFlags { /// /// No flags. /// None = 0x0000, /// ///
The -a flag causes the server to issue a ticket that is valid on all ///
host machines. ///
AllHosts = 0x0001, /// ///
The -p flag displays the ticket, but does not store it on the client ///
machine. ///
DisplayTicket = 0x0002, /// ///
The -s flag displays the status of the current ticket (if there is ///
one). ///
DisplayStatus = 0x0004, }; public partial class Options { /// /// Options for the login command. /// public Options(LoginCmdFlags flags, string host) { if ((flags & LoginCmdFlags.AllHosts) != 0) { this["-a"] = null; } if ((flags & LoginCmdFlags.DisplayTicket) != 0) { this["-p"] = null; } if ((flags & LoginCmdFlags.DisplayStatus) != 0) { this["-s"] = null; } if (string.IsNullOrEmpty(host) == false) { this["-h"] = host; } } } /// /// Options for the login command. /// public class LoginCmdOptions : Options { /// /// Options for the login command. /// public LoginCmdOptions(LoginCmdFlags flags, string host) : base(flags, host) {} } /// /// Flags for the logout command. /// [Flags] public enum LogoutCmdFlags { /// /// No flags. /// None = 0x0000, /// ///
The -a flag causes the server to issue a ticket that is valid on all ///
host machines. ///
AllHosts = 0x0001, }; public partial class Options { /// /// Options for the logout command. /// public Options(LogoutCmdFlags flags, string host) { if ((flags & LogoutCmdFlags.AllHosts) != 0) { this["-a"] = null; } } } /// /// Options for the logout command. /// public class LogoutCmdOptions : Options { /// /// Options for the logout command. /// public LogoutCmdOptions(LogoutCmdFlags flags, string host) : base(flags, host) { } } /// /// Flags for the tag command. /// [Flags] public enum TagFilesCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -d deletes the association between the specified files and the /// label, regardless of revision. /// Delete = 0x0001, /// /// The -n flag previews the results of the operation. /// ListOnly = 0x0002, }; public partial class Options { /// /// Options for the tag command. /// public Options(TagFilesCmdFlags flags, string label) { if ((flags & TagFilesCmdFlags.Delete) != 0) { this["-d"] = null; } if ((flags & TagFilesCmdFlags.ListOnly) != 0) { this["-n"] = null; } if (string.IsNullOrEmpty(label) != true) { this["-l"] = label; } } } /// /// Tag command options /// public class TagCmdOptions : Options { /// /// Options for the tag command. /// public TagCmdOptions(TagFilesCmdFlags flags, string label) : base(flags, label) { } } /// /// Flags for the stream command. /// [Flags] public enum StreamCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -d flag deletes the specified stream (unless the stream is /// referenced by child streams or stream clients). /// Delete = 0x0001, /// /// The -o flag writes the stream specification to the standard output. /// The user's editor is not invoked. /// Output = 0x0002, /// /// The -v may be used with -o to expose the automatically generated /// client view for this stream. /// View = 0x0004, /// /// The -i flag reads a stream specification from the standard input. /// The user's editor is not invoked. /// Input = 0x0008, /// /// The -f flag allows a user other than the owner to modify or delete /// a locked stream. It requires 'admin' access granted by 'p4 protect'. /// Force = 0x0010, } /// /// Options for the stream command /// public partial class Options { public Options(StreamCmdFlags flags, string parent, string type) { if ((flags & StreamCmdFlags.Output) != 0) { this["-o"] = null; } if ((flags & StreamCmdFlags.View) != 0) { this["-v"] = null; } if ((flags & StreamCmdFlags.Input) != 0) { this["-i"] = null; } if (String.IsNullOrEmpty(type) != true) { this["-t"] = type.ToLower(); } if ((flags & StreamCmdFlags.Delete) != 0) { this["-d"] = null; } if ((flags & StreamCmdFlags.Force) != 0) { this["-f"] = null; } if (String.IsNullOrEmpty(parent) != true) { this["-P"] = parent; } } } /// /// Stream command options /// public class StreamCmdOptions : Options { /// /// Stream command options /// public StreamCmdOptions(StreamCmdFlags flags, string parent, string type) : base(flags, parent, type) { } } /// /// Flags for the streams command. /// [Flags] public enum StreamsCmdFlags { /// /// No flags. /// None = 0x0000, } /// /// Options for the streams command /// public partial class Options { public Options(StreamsCmdFlags flags, string filter, string tagged, string streampath, int maxItems) { if (String.IsNullOrEmpty(filter) != true) { this["-F"] = filter; } if (String.IsNullOrEmpty(tagged) != true) { this["-T"] = tagged; } if (maxItems >= 0) { this["-m"] = maxItems.ToString(); } } } /// /// Streams command options /// public class StreamsCmdOptions : Options { /// /// Streams command options /// public StreamsCmdOptions(StreamsCmdFlags flags, string filter, string tagged, string streampath, int maxItems) : base(flags, filter, tagged, streampath, maxItems) { } } /// /// Flags for the istat command. /// [Flags] public enum GetStreamMetaDataCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -r flag shows the status of integration to the stream from its /// parent. By default, status of integration in the other direction is /// shown, from the stream to its parent. /// Reverse = 0x0001, /// /// The -a flag shows status of integration in both directions. /// All = 0x0002, /// /// The -c flag forces 'p4 istat' to assume the cache is stale; it /// causes a search for pending integrations. Use of this flag can /// impact server performance. /// Refresh = 0x0004, /// /// The -s flag shows cached state without refreshing stale data. /// Cached = 0x0008 } /// /// Options for the istat command /// public partial class Options { public Options(GetStreamMetaDataCmdFlags flags) { if ((flags & GetStreamMetaDataCmdFlags.Reverse) != 0) { this["-r"] = null; } if ((flags & GetStreamMetaDataCmdFlags.All) != 0) { this["-a"] = null; } if ((flags & GetStreamMetaDataCmdFlags.Refresh) != 0) { this["-c"] = null; } if ((flags & GetStreamMetaDataCmdFlags.Cached) != 0) { this["-s"] = null; } } } /// /// GetStreamMetaData command options /// public class GetStreamMetaDataCmdOptions : Options { /// /// Stream command options /// public GetStreamMetaDataCmdOptions(GetStreamMetaDataCmdFlags flags) : base(flags) { } } /// /// Flags for the depot command. /// [Flags] public enum DepotCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -d flag deletes the specified depot. If any files reside in /// the depot, they must be removed with 'p4 obliterate' before /// deleting the depot. /// Delete = 0x0001, /// /// The -o flag writes the depot specification to the standard output. /// The user's editor is not invoked. /// Output = 0x0002, /// /// The -i flag reads a depot specification from the standard input. /// The user's editor is not invoked. /// Input = 0x0004, } /// /// /// public partial class Options { public Options(DepotCmdFlags flags) { if ((flags & DepotCmdFlags.Output) != 0) { this["-o"] = null; } if ((flags & DepotCmdFlags.Input) != 0) { this["-i"] = null; } if ((flags & DepotCmdFlags.Delete) != 0) { this["-d"] = null; } } } /// /// depot command options /// public class DepotCmdOptions : Options { /// /// Options for the depot command /// public DepotCmdOptions(DepotCmdFlags flags) : base(flags) { } } /// /// Flags for the branch command. /// [Flags] public enum BranchSpecCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -d flag deletes the named branch spec. /// Delete = 0x0001, /// /// The -o flag writes the branch spec to standard output. /// The user's editor is not invoked. /// Output = 0x0002, /// /// The -i flag reads a branch specification from the standard input. /// The user's editor is not invoked. /// Input = 0x0004, /// /// The -f flag enables a user with 'admin' privilege to delete the /// spec or set the 'last modified' date. By default, specs can be /// deleted only by their owner. /// Force = 0x0008, } /// /// Options for the branch command /// public partial class Options { public Options(BranchSpecCmdFlags flags, string stream, string parent) { if ((flags & BranchSpecCmdFlags.Output) != 0) { this["-o"] = null; } if ((flags & BranchSpecCmdFlags.Input) != 0) { this["-i"] = null; } if ((flags & BranchSpecCmdFlags.Delete) != 0) { this["-d"] = null; } if ((flags & BranchSpecCmdFlags.Force) != 0) { this["-f"] = null; } if (String.IsNullOrEmpty(stream) != true) { this["-S"] = stream; } if (String.IsNullOrEmpty(parent) != true) { this["-P"] = parent; } } } /// /// Branch command options /// public class BranchCmdOptions : Options { /// /// Branch command options /// public BranchCmdOptions(BranchSpecCmdFlags flags, string stream, string parent) : base(flags, stream, parent) { } } /// /// Flags for the branches command. /// [Flags] public enum BranchSpecsCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -t flag displays the time as well as the date. /// Time = 0x0001, /// /// The -e nameFilter flag lists branchspecs with a name that matches /// the nameFilter pattern, for example: -e 'branchspec*'. -E makes /// the matching case-insensitive. /// IgnoreCase = 0x0002 } /// /// Options for the branches command /// public partial class Options { public Options(BranchSpecsCmdFlags flags, string user, string nameFilter, int maxItems) { if ((flags & BranchSpecsCmdFlags.Time) != 0) { this["-t"] = null; } if (String.IsNullOrEmpty(user) != true) { this["-u"] = user; } if (String.IsNullOrEmpty(nameFilter) != true) { if ((flags & BranchSpecsCmdFlags.IgnoreCase) != 0) { this["-E"] = nameFilter; } else { this["-e"] = nameFilter; } } if (maxItems >= 0) { this["-m"] = maxItems.ToString(); } } } /// /// Branches command options /// public class BranchesCmdOptions : Options { /// /// Branches command options /// public BranchesCmdOptions(BranchSpecsCmdFlags flags, string user, string nameFilter, int maxItems) :base(flags,user,nameFilter,maxItems) {} } /// /// Flags for the label command. /// [Flags] public enum LabelCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -d flag deletes the named label spec. /// Delete = 0x0001, /// /// The -o flag writes the label spec to standard output. /// The user's editor is not invoked. /// Output = 0x0002, /// /// The -i flag reads a label specification from the standard input. /// The user's editor is not invoked. /// Input = 0x0004, /// /// The -f flag forces the deletion of a label. By default, locked /// labels can only be deleted by their owner. The -f flag also /// permits the Last Modified date to be set. The -f flag requires /// 'admin' access, which is granted by 'p4 protect'. /// Force = 0x0008, /// /// The -g flag should be used on an Edge Server to update a global /// label. Without -g, the label definition is visible only to users /// of this Edge Server. Configuring rpl.labels.global=1 reverses this /// default and causes this flag to have the opposite meaning. /// Global = 0x0010, } /// /// Options for the label command /// public partial class Options { public Options(LabelCmdFlags flags, string template) { if ((flags & LabelCmdFlags.Output) != 0) { this["-o"] = null; } if ((flags & LabelCmdFlags.Input) != 0) { this["-i"] = null; } if ((flags & LabelCmdFlags.Delete) != 0) { this["-d"] = null; } if ((flags & LabelCmdFlags.Force) != 0) { this["-f"] = null; } if ((flags & LabelCmdFlags.Global) != 0) { this["-g"] = null; } if (String.IsNullOrEmpty(template) != true) { this["-t"] = template; } } } /// /// Label command options /// public class LabelCmdOptions : Options { /// /// Label command options /// public LabelCmdOptions(LabelCmdFlags flags, string template) :base(flags,template) {} } /// /// Flags for the labels command. /// [Flags] public enum LabelsCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -t flag displays the time as well as the date. /// Time = 0x0001, /// /// The -e nameFilter flag lists labels with a name that matches /// the nameFilter pattern, for example: -e 'label*'. -E makes /// the matching case-insensitive. /// IgnoreCase = 0x0002, /// /// The -U flag lists unloaded labels (see 'p4 help unload'). /// Unloaded = 0x0004, /// /// The -a flag specifies that all labels should be displayed, /// not just those that are bound to this server. /// All = 0x0008 } /// /// Options for the labels command /// public partial class Options { public Options(LabelsCmdFlags flags, string user, string nameFilter, int maxItems, string fileRevRange) { new Options(flags, user, nameFilter, maxItems, fileRevRange, null); } } /// /// Options for the labels command /// public partial class Options { public Options(LabelsCmdFlags flags, string user, string nameFilter, int maxItems, string fileRevRange, string serverId) { if ((flags & LabelsCmdFlags.Time) != 0) { this["-t"] = null; } if (String.IsNullOrEmpty(user) != true) { this["-u"] = user; } if (String.IsNullOrEmpty(nameFilter) != true) { if ((flags & LabelsCmdFlags.IgnoreCase) != 0) { this["-E"] = nameFilter; } else { this["-e"] = nameFilter; } } if (maxItems >= 0) { this["-m"] = maxItems.ToString(); } if ((flags & LabelsCmdFlags.Unloaded) != 0) { this["-U"] = null; } if ((flags & LabelsCmdFlags.All) != 0) { this["-a"] = null; } if (String.IsNullOrEmpty(serverId) != true) { this["-s"] = serverId; } } } /// /// Labels command options /// public class LabelsCmdOptions : Options { /// /// Labels command options /// public LabelsCmdOptions(LabelsCmdFlags flags, string user, string nameFilter, int maxItems, string fileRevRange) : base(flags, user, nameFilter, maxItems, fileRevRange, null) { } /// /// Labels command options /// public LabelsCmdOptions(LabelsCmdFlags flags, string user, string nameFilter, int maxItems, string fileRevRange, string serverId) : base(flags, user, nameFilter, maxItems, fileRevRange, serverId) { } } /// /// Flags for the diff2 command. /// [Flags] public enum GetDepotFileDiffsCmdFlags { /// /// No flags. /// None = 0x0000, /// /// -dn RCS output /// RCS = 0x0001, /// /// -dc[n] context /// Context = 0x0002, /// /// -ds summary /// Summary = 0x0004, /// /// -du[n] unified /// Unified = 0x0008, /// /// -db ignore whitespace changes /// IgnoreWhitespaceChanges = 0x0010, /// /// -dw ignore whitespace /// IgnoreWhitespace = 0x0020, /// /// -dl ignore line endings /// IgnoreLineEndings = 0x0040, /// /// The -Od flag limits output to files that differ. /// Limit = 0x0080, /// /// The -q omits files that have identical content and types and /// suppresses the actual diff for all files. /// Supress = 0x0100, /// /// The -t flag forces 'p4 diff2' to diff binary files. /// DiffBinary = 0x0200, /// /// The -u flag uses the GNU diff -u format and displays only files /// that differ. The file names and dates are in Perforce syntax, but /// but the output can be used by the patch program. /// GNU = 0x0400, } /// /// Options for the diff2 command /// public partial class Options { public Options(GetDepotFileDiffsCmdFlags flags, int contextLines, int unifiedLines, string branch, string stream, string parent) { if ((flags & GetDepotFileDiffsCmdFlags.RCS) != 0) { this["-dn"] = null; } if (((flags & GetDepotFileDiffsCmdFlags.Context) != 0) && (contextLines >= 0)) { this["-dc"+contextLines.ToString()]=null; } if ((flags & GetDepotFileDiffsCmdFlags.Summary) != 0) { this["-ds"] = null; } if (((flags & GetDepotFileDiffsCmdFlags.Unified) != 0) && (contextLines >= 0)) { this["-du"+ unifiedLines.ToString()]=null; } if ((flags & GetDepotFileDiffsCmdFlags.IgnoreWhitespaceChanges) != 0) { this["-db"] = null; } if ((flags & GetDepotFileDiffsCmdFlags.IgnoreWhitespace) != 0) { this["-dw"] = null; } if ((flags & GetDepotFileDiffsCmdFlags.IgnoreLineEndings) != 0) { this["-dl"] = null; } if ((flags & GetDepotFileDiffsCmdFlags.Limit) != 0) { this["-Od"] = null; } if ((flags & GetDepotFileDiffsCmdFlags.Supress) != 0) { this["-q"] = null; } if ((flags & GetDepotFileDiffsCmdFlags.DiffBinary) != 0) { this["-t"] = null; } if ((flags & GetDepotFileDiffsCmdFlags.GNU) != 0) { this["-u"] = null; } if (String.IsNullOrEmpty(branch) != true) { this["-b"] = branch; } if (String.IsNullOrEmpty(stream) != true) { this["-S"] = stream; } if (String.IsNullOrEmpty(parent) != true) { this["-P"] = parent; } } } /// /// Diff2 command options /// public class GetDepotFileDiffsCmdOptions:Options { /// /// Diff2 command options /// public GetDepotFileDiffsCmdOptions(GetDepotFileDiffsCmdFlags flags, int contextLines, int unifiedLines, string branch, string stream, string parent) :base(flags,contextLines,unifiedLines,branch,stream,parent) {} } /// /// Flags for the opened command. /// [Flags] public enum GetOpenedFilesCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -a flag lists opened files in all clients. By default, /// only files opened by the current client are listed. /// AllClients = 0x0001, /// /// The -s option produces 'short' and optimized output when used /// with the -a (all clients) option. For large repositories '-a' /// can take a long time when compared to '-as'. /// ShortOutput = 0x0002, /// /// The -x option lists files that are opened 'exclusive'. This /// option only applies to a distributed installation where global /// tracking of these file types is necessary across servers. The /// -x option implies the -a option. /// Exclusive = 0x0004 } /// /// Options for GetOpenedFiles /// public partial class Options { /// /// Options for GetOpenedFiles /// /// /// /// /// /// /// ///
p4 help opened ///
///
opened -- List open files and display file status ///
///
p4 opened [-a -c changelist# -C client -u user -m max -s] [file ...] ///
p4 opened [-a -x -m max ] [file ...] ///
///
Lists files currently opened in pending changelists, or, for ///
specified files, show whether they are currently opened or locked. ///
If the file specification is omitted, all files open in the current ///
client workspace are listed. ///
///
Files in shelved changelists are not displayed by this command. To ///
display shelved changelists, see 'p4 changes -s shelved'; to display ///
the files in those shelved changelists, see 'p4 describe -s -S'. ///
///
The -a flag lists opened files in all clients. By default, only ///
files opened by the current client are listed. ///
///
The -c changelist# flag lists files opened in the specified ///
changelist#. ///
///
The -C client flag lists files open in the specified client workspace. ///
///
The -u user flag lists files opened by the specified user. ///
///
The -m max flag limits output to the first 'max' number of files. ///
///
The -s option produces 'short' and optimized output when used with ///
the -a (all clients) option. For large repositories '-a' can take ///
a long time when compared to '-as'. ///
///
The -x option lists files that are opened 'exclusive'. This option ///
only applies to a distributed installation where global tracking of ///
these file types is necessary across servers. The -x option implies ///
the -a option. ///
///
public Options(GetOpenedFilesCmdFlags flags, string changelist, string client, string user, int maxItems) { if ((flags & GetOpenedFilesCmdFlags.AllClients) != 0) { this["-a"] = null; } if ((flags & GetOpenedFilesCmdFlags.ShortOutput) != 0) { this["-s"] = null; } if ((flags & GetOpenedFilesCmdFlags.Exclusive) != 0) { this["-x"] = null; } if (String.IsNullOrEmpty(changelist) != true) { this["-c"] = changelist; } if (String.IsNullOrEmpty(client) != true) { this["-C"] = client; } if (String.IsNullOrEmpty(user) != true) { this["-u"] = user; } if (maxItems > 0) { this["-m"] = maxItems.ToString(); } } } /// /// GetOpenedFiles options /// public class GetOpenedFilesOptions : Options { /// /// Options for GetOpenedFiles /// /// /// /// /// /// /// ///
p4 help opened ///
///
opened -- List open files and display file status ///
///
p4 opened [-a -c changelist# -C client -u user -m max -s] [file ...] ///
p4 opened [-a -x -m max ] [file ...] ///
///
Lists files currently opened in pending changelists, or, for ///
specified files, show whether they are currently opened or locked. ///
If the file specification is omitted, all files open in the current ///
client workspace are listed. ///
///
Files in shelved changelists are not displayed by this command. To ///
display shelved changelists, see 'p4 changes -s shelved'; to display ///
the files in those shelved changelists, see 'p4 describe -s -S'. ///
///
The -a flag lists opened files in all clients. By default, only ///
files opened by the current client are listed. ///
///
The -c changelist# flag lists files opened in the specified ///
changelist#. ///
///
The -C client flag lists files open in the specified client workspace. ///
///
The -u user flag lists files opened by the specified user. ///
///
The -m max flag limits output to the first 'max' number of files. ///
///
The -s option produces 'short' and optimized output when used with ///
the -a (all clients) option. For large repositories '-a' can take ///
a long time when compared to '-as'. ///
///
The -x option lists files that are opened 'exclusive'. This option ///
only applies to a distributed installation where global tracking of ///
these file types is necessary across servers. The -x option implies ///
the -a option. ///
///
public GetOpenedFilesOptions(GetOpenedFilesCmdFlags flags, string changelist, string client, string user, int maxItems) : base(flags, changelist, client, user, maxItems) { } } /// /// Flags for the fstat command. /// [Flags] public enum GetFileMetadataCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -L flag can be used with multiple file arguments that are in /// full depot syntax and include a valid revision number. When this /// flag is used the arguments are processed together by building an /// internal table similar to a label. This file list processing is /// significantly faster than having to call the internal query engine /// for each individual file argument. However, the file argument syntax /// is strict and the command will not run if an error is encountered. /// MultiFileArgs = 0x0001, /// /// The -r flag sorts the output in reverse order. /// Reverse = 0x0002, /// /// -Oa output attributes set by 'p4 attribute'. /// Attributes = 0x0004, /// /// -Od output the digest of the attribute. /// AttributeDigest = 0x0008, /// /// -Oe output attribute values encoded as hex /// HexAttributes = 0x0010, /// /// -Of output all revisions for the given files (this /// option suppresses other* and resolve* fields) /// AllRevisions = 0x0020, /// /// -Ol output a fileSize and digest field for each revision /// (this may be expensive to compute) /// FileSize = 0x0040, /// /// -Op output the local file path in both Perforce syntax /// (//client/) as 'clientFile' and host form as 'path' /// LocalPath = 0x0080, /// /// -Or output pending integration record information for /// files opened on the current client, or if used with /// '-e -Rs', on the shelved change /// PendingInteg = 0x0100, /// /// -Os exclude client-related data from output /// ExcludeClientData = 0x0200, /// /// -Rc limit output to files mapped in the client view /// ClientMapped = 0x0400, /// /// -Rh limit output to files synced to the client workspace /// Synced = 0x0800, /// /// -Rn limit output to files opened not at the head revision /// NotHeadRev = 0x1000, /// /// -Ro limit output to files opened /// Opened = 0x2000, /// /// -Rr limit output to files opened that have been resolved /// Resolved = 0x4000, /// /// -Rs limit output to files shelved (requires -e) /// Shelved = 0x8000, /// /// -Ru limit output to files opened that need resolving /// NeedsResolve = 0x10000, /// /// -St sort by filetype /// FileTypeSort = 0x20000, /// /// -Sd sort by date /// DateSort = 0x40000, /// /// -Sr sort by head revision /// HeadRevSort = 0x80000, /// /// -Sh sort by have revision /// HaveRevSort = 0x100000, /// /// -Ss sort by filesize /// FileSizeSort = 0x200000, /// /// -U displays information about unload files in /// the unload depot (see 'p4 help unload'). /// InUnloadDepot = 0x400000 } /// /// Options for the fstat command /// public partial class Options { /// /// Options for the fstat command /// /// ///
p4 help fstat ///
///
fstat -- Dump file info ///
///
p4 fstat [-F filter -L -T fields -m max -r] [-c | -e changelist#] ///
[-Ox -Rx -Sx] file[rev] ... ///
///
Fstat lists information about files, one line per file. Fstat is ///
intended for use in Perforce API applications, where the output can ///
be accessed as variables, but its output is also suitable for parsing ///
from the client command output in scripts. ///
///
The fields that fstat displays are: ///
///
clientFile -- local path (host or Perforce syntax) ///
depotFile -- name in depot ///
movedFile -- name in depot of moved to/from file ///
path -- local path (host syntax) ///
isMapped -- set if mapped client file is synced ///
shelved -- set if file is shelved ///
headAction -- action at head rev, if in depot ///
headChange -- head rev changelist#, if in depot ///
headRev -- head rev #, if in depot ///
headType -- head rev type, if in depot ///
headTime -- head rev changelist time, if in depot ///
headModTime -- head rev mod time, if in depot ///
movedRev -- head rev # of moved file ///
haveRev -- rev had on client, if on client ///
desc -- change description ///
digest -- MD5 digest (fingerprint) ///
fileSize -- file size ///
action -- open action, if opened ///
type -- open type, if opened ///
actionOwner -- user who opened file, if opened ///
change -- open changelist#, if opened ///
resolved -- resolved integration records ///
unresolved -- unresolved integration records ///
otherOpen -- set if someone else has it open ///
otherOpen# -- list of user@client with file opened ///
otherLock -- set if someone else has it locked ///
otherLock# -- user@client with file locked ///
otherAction# -- open action, if opened by someone else ///
otherChange# -- changelist, if opened by someone else ///
ourLock -- set if this user/client has it locked ///
resolveAction# -- pending integration record action ///
resolveBaseFile# -- pending integration base file ///
resolveBaseRev# -- pending integration base rev ///
resolveFromFile# -- pending integration from file ///
resolveStartFromRev# -- pending integration from start rev ///
resolveEndFromRev# -- pending integration from end rev ///
///
The -F flag lists only files satisfying the filter expression. This ///
filter syntax is similar to the one used for 'jobs -e jobview' and is ///
used to evaluate the contents of the fields in the preceding list. ///
Filtering is case-sensitive. ///
///
Example: -Ol -F "fileSize > 1000000 & headType=text" ///
///
Note: filtering is not optimized with indexes for performance. ///
///
The -L flag can be used with multiple file arguments that are in ///
full depot syntax and include a valid revision number. When this ///
flag is used the arguments are processed together by building an ///
internal table similar to a label. This file list processing is ///
significantly faster than having to call the internal query engine ///
for each individual file argument. However, the file argument syntax ///
is strict and the command will not run if an error is encountered. ///
///
The -T fields flag returns only the specified fields. The field names ///
can be specified using a comma- or space-delimited list. ///
///
Example: -Ol -T "depotFile, fileSize" ///
///
The -m max flag limits output to the specified number of files. ///
///
The -r flag sorts the output in reverse order. ///
///
The -c changelist# flag displays files modified after the specified ///
changelist was submitted. This operation is much faster than using ///
a revision range on the affected files. ///
///
The -e changelist# flag lists files modified by the specified ///
changelist. When used with the -Ro flag, only pending changes are ///
considered, to ensure that files opened for add are included. This ///
option also displays the change description. ///
///
The -O options modify the output as follows: ///
///
-Of output all revisions for the given files (this ///
option suppresses other* and resolve* fields) ///
///
-Ol output a fileSize and digest field for each revision ///
(this may be expensive to compute) ///
///
-Op output the local file path in both Perforce syntax ///
(//client/) as 'clientFile' and host form as 'path' ///
///
-Or output pending integration record information for ///
files opened on the current client, or if used with ///
'-e <change> -Rs', on the shelved change ///
///
-Os exclude client-related data from output ///
///
The -R option limits output to specific files: ///
///
-Rc files mapped in the client view ///
-Rh files synced to the client workspace ///
-Rn files opened not at the head revision ///
-Ro files opened ///
-Rr files opened that have been resolved ///
-Rs files shelved (requires -e) ///
-Ru files opened that need resolving ///
///
The -S option changes the order of output: ///
///
-St sort by filetype ///
-Sd sort by date ///
-Sr sort by head revision ///
-Sh sort by have revision ///
-Ss sort by filesize ///
///
For compatibility, the following flags are also supported: ///
-C (-Rc) -H (-Rh) -W (-Ro) -P (-Op) -l (-Ol) -s (-Os). ///
///
///
[Obsolete("use Options(GetFileMetadataCmdFlags flags, string filter, string taggedFields, int maxItems, string afterChangelist, string byChangelist, string attribPattern)")] public Options(GetFileMetadataCmdFlags flags, string filter, string taggedFields, int maxItems, string afterChangelist, string byChangelist) { new Options(flags, filter, taggedFields, maxItems, afterChangelist, byChangelist, null); } public Options(GetFileMetadataCmdFlags flags, string filter, string taggedFields, int maxItems, string afterChangelist, string byChangelist, string attribPattern) { if ((flags & GetFileMetadataCmdFlags.MultiFileArgs) != 0) { this["-L"] = null; } if ((flags & GetFileMetadataCmdFlags.Reverse) != 0) { this["-r"] = null; } if ((flags & GetFileMetadataCmdFlags.Attributes) != 0) { this["-Oa"] = null; } if ((flags & GetFileMetadataCmdFlags.AttributeDigest) != 0) { this["-Od"] = null; } if ((flags & GetFileMetadataCmdFlags.HexAttributes) != 0) { this["-Oe"] = null; } if ((flags & GetFileMetadataCmdFlags.AllRevisions) != 0) { this["-Of"] = null; } if ((flags & GetFileMetadataCmdFlags.FileSize) != 0) { this["-Ol"] = null; } if ((flags & GetFileMetadataCmdFlags.LocalPath) != 0) { this["-Op"] = null; } if ((flags & GetFileMetadataCmdFlags.PendingInteg) != 0) { this["-Or"] = null; } if ((flags & GetFileMetadataCmdFlags.ExcludeClientData) != 0) { this["Os"] = null; } if ((flags & GetFileMetadataCmdFlags.ClientMapped) != 0) { this["-Rc"] = null; } if ((flags & GetFileMetadataCmdFlags.Synced) != 0) { this["-Rh"] = null; } if ((flags & GetFileMetadataCmdFlags.NotHeadRev) != 0) { this["-Rn"] = null; } if ((flags & GetFileMetadataCmdFlags.Opened) != 0) { this["-Ro"] = null; } if ((flags & GetFileMetadataCmdFlags.Resolved) != 0) { this["-Rr"] = null; } if ((flags & GetFileMetadataCmdFlags.Shelved) != 0) { this["-Rs"] = null; } if ((flags & GetFileMetadataCmdFlags.NeedsResolve) != 0) { this["-Ru"] = null; } if ((flags & GetFileMetadataCmdFlags.FileTypeSort) != 0) { this["-St"] = null; } if ((flags & GetFileMetadataCmdFlags.DateSort) != 0) { this["-Sd"] = null; } if ((flags & GetFileMetadataCmdFlags.HeadRevSort) != 0) { this["-Sr"] = null; } if ((flags & GetFileMetadataCmdFlags.HaveRevSort) != 0) { this["-Sh"] = null; } if ((flags & GetFileMetadataCmdFlags.FileSizeSort) != 0) { this["-Ss"] = null; } if ((flags & GetFileMetadataCmdFlags.InUnloadDepot) != 0) { this["-U"] = null; } if (String.IsNullOrEmpty(filter) != true) { this["-F"] = filter; } if (String.IsNullOrEmpty(taggedFields) != true) { this["-T"] = taggedFields; } if (maxItems > 0) { this["-m"] = maxItems.ToString(); } if (String.IsNullOrEmpty(afterChangelist) != true) { this["-c"] = afterChangelist; } if (String.IsNullOrEmpty(byChangelist) != true) { this["-e"] = byChangelist; } if (String.IsNullOrEmpty(attribPattern) != true) { this["-A"] = attribPattern; } } } /// /// GetFileMetaData options (uses the fstat command) /// public class GetFileMetaDataCmdOptions : Options { /// /// Options for GetFileMetaData (uses the fstat command) /// /// ///
p4 help fstat ///
///
fstat -- Dump file info ///
///
p4 fstat [-F filter -L -T fields -m max -r] [-c | -e changelist#] ///
[-Ox -Rx -Sx] file[rev] ... ///
///
Fstat lists information about files, one line per file. Fstat is ///
intended for use in Perforce API applications, where the output can ///
be accessed as variables, but its output is also suitable for parsing ///
from the client command output in scripts. ///
///
The fields that fstat displays are: ///
///
clientFile -- local path (host or Perforce syntax) ///
depotFile -- name in depot ///
movedFile -- name in depot of moved to/from file ///
path -- local path (host syntax) ///
isMapped -- set if mapped client file is synced ///
shelved -- set if file is shelved ///
headAction -- action at head rev, if in depot ///
headChange -- head rev changelist#, if in depot ///
headRev -- head rev #, if in depot ///
headType -- head rev type, if in depot ///
headTime -- head rev changelist time, if in depot ///
headModTime -- head rev mod time, if in depot ///
movedRev -- head rev # of moved file ///
haveRev -- rev had on client, if on client ///
desc -- change description ///
digest -- MD5 digest (fingerprint) ///
fileSize -- file size ///
action -- open action, if opened ///
type -- open type, if opened ///
actionOwner -- user who opened file, if opened ///
change -- open changelist#, if opened ///
resolved -- resolved integration records ///
unresolved -- unresolved integration records ///
otherOpen -- set if someone else has it open ///
otherOpen# -- list of user@client with file opened ///
otherLock -- set if someone else has it locked ///
otherLock# -- user@client with file locked ///
otherAction# -- open action, if opened by someone else ///
otherChange# -- changelist, if opened by someone else ///
ourLock -- set if this user/client has it locked ///
resolveAction# -- pending integration record action ///
resolveBaseFile# -- pending integration base file ///
resolveBaseRev# -- pending integration base rev ///
resolveFromFile# -- pending integration from file ///
resolveStartFromRev# -- pending integration from start rev ///
resolveEndFromRev# -- pending integration from end rev ///
///
The -F flag lists only files satisfying the filter expression. This ///
filter syntax is similar to the one used for 'jobs -e jobview' and is ///
used to evaluate the contents of the fields in the preceding list. ///
Filtering is case-sensitive. ///
///
Example: -Ol -F "fileSize > 1000000 & headType=text" ///
///
Note: filtering is not optimized with indexes for performance. ///
///
The -L flag can be used with multiple file arguments that are in ///
full depot syntax and include a valid revision number. When this ///
flag is used the arguments are processed together by building an ///
internal table similar to a label. This file list processing is ///
significantly faster than having to call the internal query engine ///
for each individual file argument. However, the file argument syntax ///
is strict and the command will not run if an error is encountered. ///
///
The -T fields flag returns only the specified fields. The field names ///
can be specified using a comma- or space-delimited list. ///
///
Example: -Ol -T "depotFile, fileSize" ///
///
The -m max flag limits output to the specified number of files. ///
///
The -r flag sorts the output in reverse order. ///
///
The -c changelist# flag displays files modified after the specified ///
changelist was submitted. This operation is much faster than using ///
a revision range on the affected files. ///
///
The -e changelist# flag lists files modified by the specified ///
changelist. When used with the -Ro flag, only pending changes are ///
considered, to ensure that files opened for add are included. This ///
option also displays the change description. ///
///
The -O options modify the output as follows: ///
///
-Of output all revisions for the given files (this ///
option suppresses other* and resolve* fields) ///
///
-Ol output a fileSize and digest field for each revision ///
(this may be expensive to compute) ///
///
-Op output the local file path in both Perforce syntax ///
(//client/) as 'clientFile' and host form as 'path' ///
///
-Or output pending integration record information for ///
files opened on the current client, or if used with ///
'-e <change> -Rs', on the shelved change ///
///
-Os exclude client-related data from output ///
///
The -R option limits output to specific files: ///
///
-Rc files mapped in the client view ///
-Rh files synced to the client workspace ///
-Rn files opened not at the head revision ///
-Ro files opened ///
-Rr files opened that have been resolved ///
-Rs files shelved (requires -e) ///
-Ru files opened that need resolving ///
///
The -S option changes the order of output: ///
///
-St sort by filetype ///
-Sd sort by date ///
-Sr sort by head revision ///
-Sh sort by have revision ///
-Ss sort by filesize ///
///
For compatibility, the following flags are also supported: ///
-C (-Rc) -H (-Rh) -W (-Ro) -P (-Op) -l (-Ol) -s (-Os). ///
///
///
[Obsolete("use GetFileMetaDataCmdOptions(GetFileMetadataCmdFlags flags, string filter, string taggedFields, int maxItems, string afterChangelist, string byChangelist, string attribPattern)")] public GetFileMetaDataCmdOptions(GetFileMetadataCmdFlags flags, string filter, string taggedFields, int maxItems, string afterChangelist, string byChangelist) : base (flags, filter, taggedFields, maxItems, afterChangelist, byChangelist, null) {} public GetFileMetaDataCmdOptions(GetFileMetadataCmdFlags flags, string filter, string taggedFields, int maxItems, string afterChangelist, string byChangelist, string attribPattern) : base (flags, filter, taggedFields, maxItems, afterChangelist, byChangelist, attribPattern) {} } /// /// Flags for the files command. /// [Flags] public enum GetDepotFilesCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -a flag displays all revisions within the specific range, /// rather than just the highest revision in the range. /// AllRevisions = 0x0001, /// /// The -A flag displays files in archive depots. /// InArchiveDepots = 0x0002, /// /// The -e flag displays files with an action of anything other /// than deleted, purged or archived. Typically this revision /// is always available to sync or integrate from. /// NotDeleted = 0x0004, /// /// The -U option displays files in the unload depot (see 'p4 /// help unload' for more information about the unload depot). /// InUnloadDepot = 0x0008 } /// /// Options for the files command /// /// ///
p4 help files ///
///
files -- List files in the depot ///
///
p4 files [ -a ] [ -A ] [ -e ] [ -m max ] file[revRange] ... ///
p4 files -U unloadfile ... ///
///
List details about specified files: depot file name, revision, ///
file, type, change action and changelist number of the current ///
head revision. If client syntax is used to specify the file ///
argument, the client view mapping is used to determine the ///
corresponding depot files. ///
///
By default, the head revision is listed. If the file argument ///
specifies a revision, then all files at that revision are listed. ///
If the file argument specifies a revision range, the highest revision ///
in the range is used for each file. For details about specifying ///
revisions, see 'p4 help revisions'. ///
///
The -a flag displays all revisions within the specific range, rather ///
than just the highest revision in the range. ///
///
The -A flag displays files in archive depots. ///
///
The -e flag displays files with an action of anything other than ///
deleted, purged or archived. Typically this revision is always ///
available to sync or integrate from. ///
///
The -m flag limits files to the first 'max' number of files. ///
///
The -U option displays files in the unload depot (see 'p4 help unload' ///
for more information about the unload depot). ///
///
///
public partial class Options { public Options(GetDepotFilesCmdFlags flags, int maxFiles) { if ((flags & GetDepotFilesCmdFlags.AllRevisions) != 0) { this["-a"] = null; } if ((flags & GetDepotFilesCmdFlags.InArchiveDepots) != 0) { this["-A"] = null; } if ((flags & GetDepotFilesCmdFlags.NotDeleted) != 0) { this["-e"] = null; } if (maxFiles>0) { this["-m"] = maxFiles.ToString(); } if ((flags & GetDepotFilesCmdFlags.InUnloadDepot) != 0) { this["-U"] = null; } } } /// /// Options for the files command /// /// ///
p4 help files ///
///
files -- List files in the depot ///
///
p4 files [ -a ] [ -A ] [ -e ] [ -m max ] file[revRange] ... ///
p4 files -U unloadfile ... ///
///
List details about specified files: depot file name, revision, ///
file, type, change action and changelist number of the current ///
head revision. If client syntax is used to specify the file ///
argument, the client view mapping is used to determine the ///
corresponding depot files. ///
///
By default, the head revision is listed. If the file argument ///
specifies a revision, then all files at that revision are listed. ///
If the file argument specifies a revision range, the highest revision ///
in the range is used for each file. For details about specifying ///
revisions, see 'p4 help revisions'. ///
///
The -a flag displays all revisions within the specific range, rather ///
than just the highest revision in the range. ///
///
The -A flag displays files in archive depots. ///
///
The -e flag displays files with an action of anything other than ///
deleted, purged or archived. Typically this revision is always ///
available to sync or integrate from. ///
///
The -m flag limits files to the first 'max' number of files. ///
///
The -U option displays files in the unload depot (see 'p4 help unload' ///
for more information about the unload depot). ///
///
///
public class GetDepotFilesCmdOptions : Options { public GetDepotFilesCmdOptions(GetDepotFilesCmdFlags flags, int maxFiles) : base(flags, maxFiles) { } } /// /// Flags for the dirs command. /// [Flags] public enum GetDepotDirsCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -C flag lists only directories that fall within the /// current client view. /// CurrentClientOnly = 0x0001, /// /// The -D flag includes directories containing only deleted /// files. /// IncludeDeletedFilesDirs = 0x0002, /// /// The -H flag lists directories containing files synced to /// the current client workspace. /// SyncedDirs = 0x0004 } /// /// Options for the dirs command /// public partial class Options { public Options(GetDepotDirsCmdFlags flags, string stream) { if ((flags & GetDepotDirsCmdFlags.CurrentClientOnly) != 0) { this["-C"] = null; } if ((flags & GetDepotDirsCmdFlags.IncludeDeletedFilesDirs) != 0) { this["-D"] = null; } if ((flags & GetDepotDirsCmdFlags.SyncedDirs) != 0) { this["-H"] = null; } if (String.IsNullOrEmpty(stream) != true) { this["-S"] = stream; } } } /// /// dirs command options /// public class GetDepotDirsCmdOptions : Options { public GetDepotDirsCmdOptions(GetDepotDirsCmdFlags flags, string stream) :base(flags,stream) {} } /// /// Flags for the print command. /// [Flags] public enum GetFileContentsCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -a flag prints all revisions within the specified range, rather /// than just the highest revision in the range. /// AllRevisions = 0x0001, /// /// The -q flag suppresses the initial line that displays the file name /// and revision. /// Suppress = 0x0002 } /// /// Options for the print command /// public partial class Options { /// /// Command options for GetFileContentsCmd() /// /// /// /// ///
p4 help print ///
///
print -- Write a depot file to standard output ///
///
p4 print [-a -o localFile -q] file[revRange] ... ///
///
Retrieve the contents of a depot file to the client's standard output. ///
The file is not synced. If file is specified using client syntax, ///
Perforce uses the client view to determine the corresponding depot ///
file. ///
///
By default, the head revision is printed. If the file argument ///
includes a revision, the specified revision is printed. If the ///
file argument has a revision range, then only files selected by ///
that revision range are printed, and the highest revision in the ///
range is printed. For details about revision specifiers, see 'p4 ///
help revisions'. ///
///
The -a flag prints all revisions within the specified range, rather ///
than just the highest revision in the range. ///
///
The -o localFile flag redirects the output to the specified file on ///
the client filesystem. ///
///
The -q flag suppresses the initial line that displays the file name ///
and revision. ///
///
///
public Options(GetFileContentsCmdFlags flags, string localFile) { if ((flags & GetFileContentsCmdFlags.AllRevisions) != 0) { this["-a"] = null; } if ((flags & GetFileContentsCmdFlags.Suppress) != 0) { this["-q"] = null; } if (String.IsNullOrEmpty(localFile) != true) { this["-o"] = localFile; } } } /// /// Print command options /// public class GetFileContentsCmdOptions : Options { /// /// Command options for GetFileContentsCmd() /// /// /// /// ///
p4 help print ///
///
print -- Write a depot file to standard output ///
///
p4 print [-a -o localFile -q] file[revRange] ... ///
///
Retrieve the contents of a depot file to the client's standard output. ///
The file is not synced. If file is specified using client syntax, ///
Perforce uses the client view to determine the corresponding depot ///
file. ///
///
By default, the head revision is printed. If the file argument ///
includes a revision, the specified revision is printed. If the ///
file argument has a revision range, then only files selected by ///
that revision range are printed, and the highest revision in the ///
range is printed. For details about revision specifiers, see 'p4 ///
help revisions'. ///
///
The -a flag prints all revisions within the specified range, rather ///
than just the highest revision in the range. ///
///
The -o localFile flag redirects the output to the specified file on ///
the client filesystem. ///
///
The -q flag suppresses the initial line that displays the file name ///
and revision. ///
///
///
public GetFileContentsCmdOptions(GetFileContentsCmdFlags flags, string localFile) : base(flags, localFile) {} } /// /// Flags for the filelog command. /// [Flags] public enum GetFileHistoryCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -i flag includes inherited file history. If a file was created by /// branching (using 'p4 integrate'), filelog lists the revisions of the /// file's ancestors up to the branch points that led to the specified /// revision. File history inherited by renaming (using 'p4 move') is /// always displayed regardless of whether -i is specified. /// IncludeInherited = 0x0001, /// /// The -h flag displays file content history instead of file name /// history. The list includes revisions of other files that were /// branched or copied (using 'p4 integrate' and 'p4 resolve -at') to /// the specified revision. Revisions that were replaced by copying /// or branching are omitted, even if they are part of the history of /// the specified revision. /// ContentHistory = 0x0002, /// /// The -t flag displays the time as well as the date. /// Time = 0x0004, /// /// The -l flag lists the full text of the changelist descriptions. /// FullDescription = 0x0008, /// /// The -L flag lists the full text of the changelist descriptions, /// truncated to 250 characters if longer. /// TruncatedDescription = 0x0010, /// /// The -s flag displays a shortened form of filelog that omits /// non-contributory integrations. /// Shortened = 0x0020 } /// /// Options for the filelog command /// public partial class Options { public Options(GetFileHistoryCmdFlags flags, int changeList, int maxRevs) { if ((flags & GetFileHistoryCmdFlags.IncludeInherited) != 0) { this["-i"] = null; } if ((flags & GetFileHistoryCmdFlags.ContentHistory) != 0) { this["-h"] = null; } if ((flags & GetFileHistoryCmdFlags.Time) != 0) { this["-t"] = null; } if ((flags & GetFileHistoryCmdFlags.FullDescription) != 0) { this["-l"] = null; } if ((flags & GetFileHistoryCmdFlags.TruncatedDescription) != 0) { this["-L"] = null; } if ((flags & GetFileHistoryCmdFlags.Shortened) != 0) { this["-s"] = null; } if (changeList > 0) { this["-c"] = changeList.ToString(); } if (maxRevs > 0) { this["-m"] = maxRevs.ToString(); } } } /// /// Filelog command options /// public class GetFileHistoryCmdOptions:Options { /// /// Filelog command options /// public GetFileHistoryCmdOptions(GetFileHistoryCmdFlags flags, int changeList, int maxRevs) :base(flags,changeList,maxRevs) {} } /// /// Flags for the annotate command. /// [Flags] public enum GetFileAnnotationsCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -a flag includes both deleted files and lines no longer /// present at the head revision. In the latter case, both the /// starting and ending revision for each line is displayed. /// AllResults = 0x0001, /// /// The -c flag directs the annotate command to output changelist /// numbers rather than revision numbers for each line. /// UseChangeNumbers = 0x0002, /// /// -db Ignore Whitespace Changes /// IgnoreWhitespaceChanges = 0x0004, /// /// -dw Ingore whitespace altogether. /// IgnoreWhitespace = 0x0008, /// /// -dl Ignore Line Endings /// IgnoreLineEndings = 0x0010, /// /// The -i flag follows branches. If a file was created by /// branching, 'p4 annotate' includes the revisions of the /// source file up to the branch point, just as 'p4 filelog -i' /// does. If a file has history prior to being created by /// branching (such as a file that was branched on top of a /// deleted file), -i ignores those prior revisions and follows /// the source. -i implies -c. /// FollowBranches = 0x0020, /// /// The -I flag follows all integrations into the file. If a /// line was introduced into the file by a merge, the source of /// the merge is displayed as the changelist that introduced the /// line. If the source itself was the result of an integration, /// that source is used instead, and so on. -I implies -c. /// FollowIntegrations = 0x0040, /// /// The -q flag suppresses the one-line header that is displayed /// by default for each file. This flag does not affect tagged /// output returned by a command. GetFileAnnotations runs in /// tagged mode. /// Suppress = 0x0080 } /// /// Options for the annotate command /// public partial class Options { public Options(GetFileAnnotationsCmdFlags flags, string localFile) { if ((flags & GetFileAnnotationsCmdFlags.AllResults) != 0) { this["-a"] = null; } if ((flags & GetFileAnnotationsCmdFlags.UseChangeNumbers) != 0) { this["-c"] = null; } if ((flags & GetFileAnnotationsCmdFlags.IgnoreWhitespaceChanges) != 0) { this["-db"] = null; } if ((flags & GetFileAnnotationsCmdFlags.IgnoreWhitespace) != 0) { this["-dw"] = null; } if ((flags & GetFileAnnotationsCmdFlags.IgnoreLineEndings) != 0) { this["-dl"] = null; } if ((flags & GetFileAnnotationsCmdFlags.FollowBranches) != 0) { this["-i"] = null; } if ((flags & GetFileAnnotationsCmdFlags.FollowIntegrations) != 0) { this["-I"] = null; } if ((flags & GetFileAnnotationsCmdFlags.Suppress) != 0) { this["-q"] = null; } } } /// /// Annotate command options /// public class GetFileAnnotationsCmdOptions: Options { /// /// Annotate command options /// public GetFileAnnotationsCmdOptions(GetFileAnnotationsCmdFlags flags, string localFile) :base(flags,localFile) {} } /// /// Flags for the fixes command. /// [Flags] public enum GetFixesCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -C flag lists only directories that fall within the /// current client view. /// IncludeIntegrations = 0x0001 } /// /// Options for the fixes command /// public partial class Options { public Options(GetFixesCmdFlags flags, int changelistId, string jobId, int maxFixes) { if ((flags & GetFixesCmdFlags.IncludeIntegrations) != 0) { this["-i"] = null; } if (changelistId > 0) { this["-c"] = changelistId.ToString(); } if (String.IsNullOrEmpty(jobId) != true) { this["-j"] = jobId; } if (maxFixes > 0) { this["-m"] = maxFixes.ToString(); } } } /// /// Fixes command options /// public class GetFixesCmdOptions : Options { /// /// Fixes command options /// public GetFixesCmdOptions(GetFixesCmdFlags flags, int changelistId, string jobId, int maxFixes) :base(flags, changelistId, jobId,maxFixes) {} } /// /// Flags for the grep command. /// [Flags] public enum GetFileLineMatchesCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -a flag searches all revisions within the specified /// range. By default only the highest revision in the range /// is searched. /// AllRevisions = 0x0001, /// /// The -i flag causes the pattern matching to be case-insensitive. /// By default, matching is case-sensitive. /// CaseInsensitive = 0x0002, /// /// The -n flag displays the matching line number after the file /// revision number. By default, matches are displayed as /// revision#: <text>. /// IncludeLineNumbers = 0x0004, /// /// The -v flag displays files with non-matching lines. /// NonMatchingLines = 0x0008, /// /// The -t flag searches binary files. By default, only text files /// are searched. /// SearchBinaries = 0x0010, /// /// The -L flag displays the name of each selected file from which no /// output would normally have been displayed. Scanning stops on the /// first match. /// NameNoOutput = 0x0020, /// /// The -l flag display the name of each selected file containing /// matching text. Scanning stops on the first match. /// NameMatchingText = 0x0040, /// /// The -s flag suppresses error messages that result from abandoning /// files that have a maximum number of characters in a single line that /// are greater than 4096. By default, an error is reported when grep /// abandons such files. /// Supress = 0x0080, /// /// The -F flag is used to interpret the pattern as a fixed string. /// FixedPattern = 0x0100, /// /// The -G flag is used to interpret the pattern as a regular expression. /// RegularExpression = 0x0200 } /// /// Options for the grep command /// public partial class Options { public Options(GetFileLineMatchesCmdFlags flags, int outputContext, int trailingContext, int leadingContext) { if ((flags & GetFileLineMatchesCmdFlags.AllRevisions) != 0) { this["-a"] = null; } if ((flags & GetFileLineMatchesCmdFlags.CaseInsensitive) != 0) { this["-i"] = null; } if ((flags & GetFileLineMatchesCmdFlags.IncludeLineNumbers) != 0) { this["-n"] = null; } if ((flags & GetFileLineMatchesCmdFlags.NonMatchingLines) != 0) { this["-v"] = null; } if ((flags & GetFileLineMatchesCmdFlags.FixedPattern) != 0) { this["-F"] = null; } if ((flags & GetFileLineMatchesCmdFlags.RegularExpression) != 0) { this["-G"] = null; } if ((flags & GetFileLineMatchesCmdFlags.NameNoOutput) != 0) { this["-L"] = null; } if ((flags & GetFileLineMatchesCmdFlags.NameMatchingText) != 0) { this["-l"] = null; } if ((flags & GetFileLineMatchesCmdFlags.SearchBinaries) != 0) { this["-t"] = null; } if ((flags & GetFileLineMatchesCmdFlags.Supress) != 0) { this["-s"] = null; } if (trailingContext > 0) { this["-A"] = trailingContext.ToString(); } if (leadingContext > 0) { this["-B"] = leadingContext.ToString(); } if (outputContext > 0) { this["-C"] = outputContext.ToString(); } } } /// /// Grep command options /// public class GetFileLineMatchesCmdOptions:Options { /// /// Grep command options /// public GetFileLineMatchesCmdOptions(GetFileLineMatchesCmdFlags flags, int outputContext, int trailingContext, int leadingContext) :base(flags,outputContext,trailingContext,leadingContext) {} } /// /// Flags for the integrated command. /// [Flags] public enum GetSubmittedIntegrationsCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -r flag reverses the mappings in the branch view, swapping the /// target files and source files. The -b branch flag is required. /// ReverseMappings = 0x0001 } /// /// Options for the integrated command /// public partial class Options { public Options(GetSubmittedIntegrationsCmdFlags flags, string branchSpec) { if ((flags & GetSubmittedIntegrationsCmdFlags.ReverseMappings) != 0) { this["-r"] = null; } if (String.IsNullOrEmpty(branchSpec) != true) { this["-b"] = branchSpec; } } } /// /// Integrated command options /// public class GetSubmittedIntegrationsCmdOptions:Options { /// /// Integrated command options /// public GetSubmittedIntegrationsCmdOptions(GetSubmittedIntegrationsCmdFlags flags, string branchSpec) :base(flags,branchSpec) {} } /// /// Flags for the protects command. /// [Flags] public enum GetProtectionEntriesCmdFlags { /// /// No flags. /// None = 0x0000, /// /// If the -a flag is specified, protection lines for all users are /// displayed. If the -g group flag or -u user flag is specified, /// protection lines for that group or user are displayed. /// AllUsers = 0x0001, /// /// If the -m flag is given, a single word summary of the maximum /// access level is reported. Note that this summary does not take /// exclusions into account. /// AccessSummary = 0x0002 } /// /// Options for the protects command /// public partial class Options { public Options(GetProtectionEntriesCmdFlags flags, string groupName, string userName, string hostName) { if ((flags & GetProtectionEntriesCmdFlags.AllUsers) != 0) { this["-a"] = null; } if ((flags & GetProtectionEntriesCmdFlags.AccessSummary) != 0) { this["-m"] = null; } if (String.IsNullOrEmpty(groupName) != true) { this["-g"] = groupName; } if (String.IsNullOrEmpty(userName) != true) { this["-u"] = userName; } if (String.IsNullOrEmpty(hostName) != true) { this["-h"] = hostName; } } } /// /// Protects command options /// public class GetProtectionEntriesCmdOptions:Options { /// /// Protects command options /// public GetProtectionEntriesCmdOptions(GetProtectionEntriesCmdFlags flags, string groupName, string userName, string hostName) :base(flags,groupName,userName,hostName) {} } /// /// Flags for the reviews command. /// [Flags] public enum GetReviewersCmdFlags { /// /// No flags. /// None = 0x0000 } /// /// Options for the reviews command /// public partial class Options { public Options(GetReviewersCmdFlags flags, int changelistId) { if (changelistId >= 0) { this["-c"] = changelistId.ToString(); } } } /// /// Reviews command options /// public class GetReviewersCmdOptions:Options { /// /// Reviews command options /// public GetReviewersCmdOptions(GetReviewersCmdFlags flags, int changelistId) :base(flags,changelistId){} } /// /// Flags for the triggers command. /// [Flags] public enum GetTriggerTableCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -o flag writes the trigger table to the standard output. /// The user's editor is not invoked. /// Output = 0x0001, /// /// The -i flag writes the trigger table from the standard input. /// The user's editor is not invoked. /// Input = 0x0002 } /// /// Options for the triggers command /// public partial class Options { public Options(GetTriggerTableCmdFlags flags) { if ((flags & GetTriggerTableCmdFlags.Output) != 0) { this["-o"] = null; } if ((flags & GetTriggerTableCmdFlags.Input) != 0) { this["-i"] = null; } } } /// /// Triggers command options /// public class GetTriggerTableCmdOptions:Options { /// /// Triggers command options /// public GetTriggerTableCmdOptions(GetTriggerTableCmdFlags flags) :base(flags) {} } /// /// Flags for the typemap command. /// [Flags] public enum GetTypeMapCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -o flag writes the typemap table to the standard output. /// The user's editor is not invoked. /// Output = 0x0001, /// /// The -i flag writes the typemap table from the standard input. /// The user's editor is not invoked. /// Input = 0x0002 } /// /// Options for the typemap command /// public partial class Options { public Options(GetTypeMapCmdFlags flags) { if ((flags & GetTypeMapCmdFlags.Output) != 0) { this["-o"] = null; } if ((flags & GetTypeMapCmdFlags.Input) != 0) { this["-i"] = null; } } } /// /// GetTypeMap command options /// public class GetTypeMapCmdOptions:Options { /// /// GetTypeMap command options /// public GetTypeMapCmdOptions(GetTypeMapCmdFlags flags) :base(flags) {} } /// /// Flags for the protect command. /// [Flags] public enum GetProtectionTableCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -o flag writes the protection table to the standard output. /// The user's editor is not invoked. /// Output = 0x0001, /// /// The -i flag writes the protection table from the standard input. /// The user's editor is not invoked. /// Input = 0x0002 } /// /// Options for the protect command /// public partial class Options { public Options(GetProtectionTableCmdFlags flags) { if ((flags & GetProtectionTableCmdFlags.Output) != 0) { this["-o"] = null; } if ((flags & GetProtectionTableCmdFlags.Input) != 0) { this["-i"] = null; } } } /// /// protect command options /// public class GetProtectionTableCmdOptions:Options { /// /// protect command options /// public GetProtectionTableCmdOptions(GetProtectionTableCmdFlags flags) :base(flags) {} } /// /// Flags for the counter command. /// [Flags] public enum CounterCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -f flag sets or deletes counters used by Perforce, which are /// listed by 'p4 help counters'. Important: Never set the 'change' /// counter to a value that is lower than its current value. /// Set = 0x0001, /// /// The -d flag deletes counters used by Perforce, which are listed /// by 'p4 help counters'. Important: Never set the 'change' counter /// to a value that is lower than its current value. must be used with /// -f. /// Delete = 0x0002, /// /// The -i flag increments a counter by 1 and returns the new value. /// This option is used instead of a value argument and can only be /// used with numeric counters. /// Increment = 0x0004 } /// /// Options for the counter command /// public partial class Options { public Options(CounterCmdFlags flags) { if ((flags & CounterCmdFlags.Delete) != 0) { this["-d"] = null; } if ((flags & CounterCmdFlags.Set) != 0) { this["-f"] = null; } if ((flags & CounterCmdFlags.Increment) != 0) { this["-i"] = null; } } } /// /// Counter command options /// public class CoutnerCmdOptions:Options { /// /// Counter command options /// public CoutnerCmdOptions(CounterCmdFlags flags) :base(flags) {} } /// /// Flags for the describe command. /// [Flags] public enum DescribeChangelistCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -d flag deletes the specified stream (unless the stream is /// referenced by child streams or stream clients). /// RCS = 0x0001, /// /// -dn RCS output. /// Context = 0x0002, /// /// -dc[n] context /// Summary = 0x0004, /// /// -dc[n] context /// Unified = 0x0008, /// /// -dc[n] context /// IgnoreWhitespaceChanges = 0x0010, /// /// -dc[n] context /// IgnoreWhitespace = 0x0020, /// /// -dc[n] context /// IgnoreLineEndings = 0x0040, /// /// The -s flag omits the diffs of files that were updated. /// Omit = 0x0080, /// /// The -S flag lists files that are shelved for the specified changelist /// and displays diffs of the files against their previous revision. /// Shelved = 0x0100, /// /// The -f flag forces display of the descriptions in a restricted /// change. The -f flag requires 'admin' access, which is granted /// using 'p4 protect'. /// Force = 0x0200, } public partial class Options { /// /// Options for the Describe command /// /// /// /// /// ///
p4 help describe ///
///
describe -- Display a changelist description ///
///
p4 describe [-d<flags> -s -S -f] changelist# ... ///
///
Display a changelist description, including the changelist number, ///
user, client, date of submission, textual description, list of ///
affected files and diffs of files updated. Pending changelists ///
are indicated as 'pending' and file diffs are not displayed. ///
///
For restricted changelists, 'no permission' is displayed if the user ///
is not permitted to view the change (see 'p4 help change'). If a ///
submitted or shelved change is restricted, the description is hidden ///
unless the user is the owner of the change or has list permission for ///
at least one file in the change. To view restricted pending (not ///
shelved) changes, the user must be the owner of the change. ///
///
The -d<flags> passes one or more flags to the built-in diff routine ///
to modify the output: -dn (RCS), -dc[n] (context), -ds (summary), ///
-du[n] (unified), -db (ignore whitespace changes), -dw (ignore ///
whitespace), -dl (ignore line endings). The optional argument to ///
to -dc specifies number of context lines. ///
///
The -s flag omits the diffs of files that were updated. ///
///
The -S flag lists files that are shelved for the specified changelist ///
and displays diffs of the files against their previous revision. ///
///
The -f flag forces display of the descriptions in a restricted ///
change. The -f flag requires 'admin' access, which is granted ///
using 'p4 protect'. ///
///
///
public Options(DescribeChangelistCmdFlags flags, int contextLines, int unifiedLines) { if ((flags & DescribeChangelistCmdFlags.RCS) != 0) { this["-dn"] = null; } if (((flags & DescribeChangelistCmdFlags.Context) != 0) && (contextLines >= 0)) { this["-dc"] = contextLines.ToString(); } if ((flags & DescribeChangelistCmdFlags.Summary) != 0) { this["-ds"] = null; } if (((flags & DescribeChangelistCmdFlags.Unified) != 0) && (contextLines >= 0)) { this["-du"] = unifiedLines.ToString(); } if ((flags & DescribeChangelistCmdFlags.IgnoreWhitespaceChanges) != 0) { this["-db"] = null; } if ((flags & DescribeChangelistCmdFlags.IgnoreWhitespace) != 0) { this["-dw"] = null; } if ((flags & DescribeChangelistCmdFlags.IgnoreLineEndings) != 0) { this["-dl"] = null; } if ((flags & DescribeChangelistCmdFlags.Omit) != 0) { this["-s"] = null; } if ((flags & DescribeChangelistCmdFlags.Shelved) != 0) { this["-S"] = null; } if ((flags & DescribeChangelistCmdFlags.Force) != 0) { this["-f"] = null; } } } /// /// Options for the Describe command /// public class DescribeCmdOptions : Options { /// /// Options for the Describe command /// /// /// /// /// ///
p4 help describe ///
///
describe -- Display a changelist description ///
///
p4 describe [-d<flags> -s -S -f] changelist# ... ///
///
Display a changelist description, including the changelist number, ///
user, client, date of submission, textual description, list of ///
affected files and diffs of files updated. Pending changelists ///
are indicated as 'pending' and file diffs are not displayed. ///
///
For restricted changelists, 'no permission' is displayed if the user ///
is not permitted to view the change (see 'p4 help change'). If a ///
submitted or shelved change is restricted, the description is hidden ///
unless the user is the owner of the change or has list permission for ///
at least one file in the change. To view restricted pending (not ///
shelved) changes, the user must be the owner of the change. ///
///
The -d<flags> passes one or more flags to the built-in diff routine ///
to modify the output: -dn (RCS), -dc[n] (context), -ds (summary), ///
-du[n] (unified), -db (ignore whitespace changes), -dw (ignore ///
whitespace), -dl (ignore line endings). The optional argument to ///
to -dc specifies number of context lines. ///
///
The -s flag omits the diffs of files that were updated. ///
///
The -S flag lists files that are shelved for the specified changelist ///
and displays diffs of the files against their previous revision. ///
///
The -f flag forces display of the descriptions in a restricted ///
change. The -f flag requires 'admin' access, which is granted ///
using 'p4 protect'. ///
///
///
public DescribeCmdOptions(DescribeChangelistCmdFlags flags, int contextLines, int unifiedLines) : base(flags, contextLines, unifiedLines) { } } /// /// Flags for the trust command. /// [Flags] public enum TrustCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -l flag lists existing known fingerprints. /// List = 0x0001, /// /// The -y flag will cause prompts to be automatically accepted. /// AutoAccept = 0x0002, /// /// The -n flag will cause prompts to be automatically refused. /// AutoReject = 0x0004, /// /// The -d flag will remove an existing trusted fingerprint of a connection. /// Delete = 0x0008, /// /// The -f flag will force the replacement of a mismatched fingerprint. /// ForceReplacement = 0x0010, /// /// The -i flag will allow a specific fingerprint to be installed. /// Install = 0x0020, /// /// The -r flag specifies that a replacement fingerprint is to be /// affected. Replacement fingerprints can be used in anticipation /// of a server replacing its key. If a replacement fingerprint /// exists for a connection and the primary fingerprint does not match /// while the replacement fingerprint does, the replacement fingerprint /// will replace the primary. This flag can be combined with -l, -i, /// or -d. /// Replacement = 0x0040, } public partial class Options { /// /// Options for the trust command /// /// /// ///
p4 trust -h ///
///
trust -- Establish trust of an SSL connection ///
///
p4 trust [ -l -y -n -d -f -r -i <fingerprint> ] ///
///
Establish trust of an SSL connection. This client command manages ///
the p4 trust file. This file contains fingerprints of the keys ///
received on ssl connections. When an SSL connection is made, this ///
file is examined to determine if the SSL connection has been used ///
before and if the key is the same as a previously seen key for that ///
connection. Establishing trust with a connection prevents undetected ///
communication interception (man-in-the-middle) attacks. ///
///
Most options are mutually exclusive. Only the -r and -f options ///
can be combined with the others. ///
///
The -l flag lists existing known fingerprints. ///
///
Without options, this command will make a connection to a server ///
and examine the key if present, if one cannot be found this command ///
will show a fingerprint and ask if this connection should be trusted. ///
If a fingerprint exists and does not match, an error that a possible ///
security problems exists will be displayed. ///
///
The -y flag will cause prompts to be automatically accepted. ///
///
The -n flag will cause prompts to be automatically refused. ///
///
The -d flag will remove an existing trusted fingerprint of a connection. ///
///
The -f flag will force the replacement of a mismatched fingerprint. ///
///
The -i flag will allow a specific fingerprint to be installed. ///
///
The -r flag specifies that a replacement fingerprint is to be ///
affected. Replacement fingerprints can be used in anticipation ///
of a server replacing its key. If a replacement fingerprint ///
exists for a connection and the primary fingerprint does not match ///
while the replacement fingerprint does, the replacement fingerprint ///
will replace the primary. This flag can be combined with -l, -i, ///
or -d. ///
public Options(TrustCmdFlags flags) { if ((flags & TrustCmdFlags.List) != 0) { this["-l"] = null; } if ((flags & TrustCmdFlags.AutoAccept) != 0) { this["-y"] = null; } if ((flags & TrustCmdFlags.AutoReject) != 0) { this["-n"] = null; } if ((flags & TrustCmdFlags.Delete) != 0) { this["-d"] = null; } if ((flags & TrustCmdFlags.ForceReplacement) != 0) { this["-f"] = null; } if ((flags & TrustCmdFlags.Install) != 0) { this["-i"] = null; } if ((flags & TrustCmdFlags.Replacement) != 0) { this["-r"] = null; } } } /// /// Options for the Trust command /// public class TrustCmdOptions : Options { /// /// Options for the Describe command /// /// /// /// /// ///
p4 trust -h ///
///
trust -- Establish trust of an SSL connection ///
///
p4 trust [ -l -y -n -d -f -r -i <fingerprint> ] ///
///
Establish trust of an SSL connection. This client command manages ///
the p4 trust file. This file contains fingerprints of the keys ///
received on ssl connections. When an SSL connection is made, this ///
file is examined to determine if the SSL connection has been used ///
before and if the key is the same as a previously seen key for that ///
connection. Establishing trust with a connection prevents undetected ///
communication interception (man-in-the-middle) attacks. ///
///
Most options are mutually exclusive. Only the -r and -f options ///
can be combined with the others. ///
///
The -l flag lists existing known fingerprints. ///
///
Without options, this command will make a connection to a server ///
and examine the key if present, if one cannot be found this command ///
will show a fingerprint and ask if this connection should be trusted. ///
If a fingerprint exists and does not match, an error that a possible ///
security problems exists will be displayed. ///
///
The -y flag will cause prompts to be automatically accepted. ///
///
The -n flag will cause prompts to be automatically refused. ///
///
The -d flag will remove an existing trusted fingerprint of a connection. ///
///
The -f flag will force the replacement of a mismatched fingerprint. ///
///
The -i flag will allow a specific fingerprint to be installed. ///
///
The -r flag specifies that a replacement fingerprint is to be ///
affected. Replacement fingerprints can be used in anticipation ///
of a server replacing its key. If a replacement fingerprint ///
exists for a connection and the primary fingerprint does not match ///
while the replacement fingerprint does, the replacement fingerprint ///
will replace the primary. This flag can be combined with -l, -i, ///
or -d. ///
public TrustCmdOptions(TrustCmdFlags flags) : base(flags) { } } /// /// Flags for the info command. /// [Flags] public enum InfoCmdFlags { /// /// No flags. /// None = 0x0000, /// /// The -s option produces 'short' output that omits any information /// that requires a database lookup such as the client root). /// Short = 0x0001, } public partial class Options { /// /// Options for the trust command /// /// /// ///
p4 help info ///
info -- Display client/server information ///
///
p4 info [-s] ///
Info lists information about the current client (user name, ///
client name, applicable client root, client current directory, ///
and the client IP address) and some server information (server ///
IP address, server root, date, uptime, version and license data). ///
///
The -s option produces 'short' output that omits any information ///
that requires a database lookup such as the client root). ///
public Options(InfoCmdFlags flags) { if ((flags & InfoCmdFlags.Short) != 0) { this["-s"] = null; } } } /// /// Options for the Trust command /// public class InfoCmdOptions : Options { /// /// Options for the Describe command /// /// /// /// /// ///
p4 help info ///
info -- Display client/server information ///
///
p4 info [-s] ///
Info lists information about the current client (user name, ///
client name, applicable client root, client current directory, ///
and the client IP address) and some server information (server ///
IP address, server root, date, uptime, version and license data). ///
///
The -s option produces 'short' output that omits any information ///
that requires a database lookup such as the client root). ///
public InfoCmdOptions(InfoCmdFlags flags) : base(flags) { } } }