public class MergeFilesOptions extends Options
Note also that the current implementation makes no attempt to validate the sanity or otherwise of the various options and their combination.
Modifier and Type | Field and Description |
---|---|
protected boolean |
bidirectionalMerge
Cause the branch view to work bidirectionally, where the scope of
the command is limited to integrations whose 'from' files match
fromFile[revRange].
|
protected java.lang.String |
branch
If non-null, use a user-defined branch view.
|
protected int |
changelistId
If positive, the integrated files are opened in the numbered
pending changelist instead of the default changelist.
|
protected boolean |
forceStreamMerge
If true, force merging even though the stream does not expect a merge
to occur in the direction indicated.
|
protected int |
maxFiles
If positive, integrate only the first maxFiles files.
|
static java.lang.String |
OPTIONS_SPECS
Options: -c[changelist], -n, -q, -m[max], -b[branch], -S[stream], -P[parentStream], -F, -r, -s
|
protected java.lang.String |
parentStream
If non-null, specify a parent stream other than the stream's actual
parent.
|
protected boolean |
quiet
If true, suppresses normal output messages.
|
protected boolean |
reverseMapping
Reverse the mappings in the branch view, with the
target files and source files exchanging place.
|
protected boolean |
showActionsOnly
Display what integrations would be necessary but don't
actually do them.
|
protected java.lang.String |
stream
If not null, makes 'p4 integrate' use a stream's branch view.
|
immutable, optionList
Constructor and Description |
---|
MergeFilesOptions()
Default constructor.
|
MergeFilesOptions(int changelistId,
boolean showActionsOnly,
int maxFiles,
java.lang.String branch,
boolean reverseMapping,
boolean bidirectionalInteg)
Explicit-value constructor for use with a branch.
|
MergeFilesOptions(int changelistId,
boolean showActionsOnly,
int maxFiles,
java.lang.String stream,
java.lang.String parentStream,
boolean forceStreamMerge,
boolean reverseMapping)
Explicit-value constructor for use with a stream.
|
MergeFilesOptions(java.lang.String... options)
Strings-based constructor; see 'p4 help [command]' for possible options.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getBranch() |
int |
getChangelistId() |
int |
getMaxFiles() |
java.lang.String |
getParentStream() |
java.lang.String |
getStream() |
boolean |
isBidirectionalInteg() |
boolean |
isForceStreamMerge() |
boolean |
isQuiet() |
boolean |
isReverseMapping() |
boolean |
isShowActionsOnly() |
java.util.List<java.lang.String> |
processOptions(IServer server)
Turn this (specific) options object into a list of strings to be sent to
the Perforce server as options for a specific command.
|
MergeFilesOptions |
setBidirectionalInteg(boolean bidirectionalInteg) |
MergeFilesOptions |
setBranch(java.lang.String branch) |
MergeFilesOptions |
setChangelistId(int changelistId) |
MergeFilesOptions |
setForceStreamMerge(boolean forceStreamMerge) |
MergeFilesOptions |
setMaxFiles(int maxFiles) |
MergeFilesOptions |
setParentStream(java.lang.String parentStream) |
MergeFilesOptions |
setQuiet(boolean quiet) |
MergeFilesOptions |
setReverseMapping(boolean reverseMapping) |
MergeFilesOptions |
setShowActionsOnly(boolean showActionsOnly) |
MergeFilesOptions |
setStream(java.lang.String stream) |
getOptions, isImmutable, processFields, setImmutable, setOptions
public static final java.lang.String OPTIONS_SPECS
protected int changelistId
protected boolean bidirectionalMerge
protected boolean showActionsOnly
protected boolean quiet
protected boolean reverseMapping
protected int maxFiles
protected java.lang.String branch
protected java.lang.String stream
protected java.lang.String parentStream
protected boolean forceStreamMerge
public MergeFilesOptions()
public MergeFilesOptions(java.lang.String... options)
WARNING: you should not pass more than one option or argument in each string parameter. Each option or argument should be passed-in as its own separate string parameter, without any spaces between the option and the option value (if any).
NOTE: setting options this way always bypasses the internal options values, and getter methods against the individual values corresponding to the strings passed in to this constructor will not normally reflect the string's setting. Do not use this constructor unless you know what you're doing and / or you do not also use the field getters and setters.
options
- optionsOptions(java.lang.String...)
public MergeFilesOptions(int changelistId, boolean showActionsOnly, int maxFiles, java.lang.String branch, boolean reverseMapping, boolean bidirectionalInteg)
changelistId
- changelistIdshowActionsOnly
- showActionsOnlymaxFiles
- maxFilesbranch
- branchreverseMapping
- reverseMappingbidirectionalInteg
- bidirectionalIntegpublic MergeFilesOptions(int changelistId, boolean showActionsOnly, int maxFiles, java.lang.String stream, java.lang.String parentStream, boolean forceStreamMerge, boolean reverseMapping)
changelistId
- changelistIdshowActionsOnly
- showActionsOnlymaxFiles
- maxFilesstream
- streamparentStream
- parentStreamforceStreamMerge
- forceStreamMergereverseMapping
- reverseMappingpublic java.util.List<java.lang.String> processOptions(IServer server) throws OptionsException
Options
The method is used by the server object to generate the string-based arguments expected by the Perforce server corresponding to the state of this method-specific options object. Will return an empty list if there are no "interesting" options set or available. May simply return the superclass options string list if is non-null, but that behaviour is neither guaranteed nor required.
Note that this method is not intended to be called directly by users but by the underlying P4Java plumbing; odd results may occur if this method is called in other contexts.
processOptions
in class Options
server
- possibly-null IServer representing the Perforce server the
options are to be used against. If this parameter is null, it
is acceptable to throw an OptionsException, but it is also
possible to ignore it and do the best you can with what you've
got...OptionsException
- if an error occurs in options processing that is not some
species of ConnectionException, RequestException,
AccessException, etc.Options.processOptions(com.perforce.p4java.server.IServer)
public int getChangelistId()
public MergeFilesOptions setChangelistId(int changelistId)
public boolean isShowActionsOnly()
public MergeFilesOptions setShowActionsOnly(boolean showActionsOnly)
public boolean isQuiet()
public MergeFilesOptions setQuiet(boolean quiet)
public boolean isReverseMapping()
public MergeFilesOptions setReverseMapping(boolean reverseMapping)
public boolean isBidirectionalInteg()
public MergeFilesOptions setBidirectionalInteg(boolean bidirectionalInteg)
public int getMaxFiles()
public MergeFilesOptions setMaxFiles(int maxFiles)
public java.lang.String getBranch()
public MergeFilesOptions setBranch(java.lang.String branch)
public java.lang.String getStream()
public MergeFilesOptions setStream(java.lang.String stream)
public java.lang.String getParentStream()
public MergeFilesOptions setParentStream(java.lang.String parentStream)
public boolean isForceStreamMerge()
public MergeFilesOptions setForceStreamMerge(boolean forceStreamMerge)