Class DuplicateDelegator
- java.lang.Object
-
- com.perforce.p4java.impl.mapbased.server.cmd.BaseDelegator
-
- com.perforce.p4java.impl.mapbased.server.cmd.DuplicateDelegator
-
- All Implemented Interfaces:
IDuplicateDelegator
public class DuplicateDelegator extends BaseDelegator implements IDuplicateDelegator
Implementation to handle the Duplicate command.
-
-
Field Summary
-
Fields inherited from class com.perforce.p4java.impl.mapbased.server.cmd.BaseDelegator
MAX_LIMIT_SUPPORTED_MIN_VERSION, QUERY_EXPRESSIONS_SUPPORTED_MIN_VERSION, USER_RESTRICTIONS_SUPPORTED_MIN_VERSION
-
-
Constructor Summary
Constructors Constructor Description DuplicateDelegator(IOptionsServer server)
Instantiate a new DuplicateDelegator, providing the server object that will be used to execute Perforce Helix attribute commands.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<IFileSpec>
duplicateRevisions(IFileSpec fromFile, IFileSpec toFile, DuplicateRevisionsOptions opts)
Duplicate revisions with integration history (unsupported).
-
-
-
Constructor Detail
-
DuplicateDelegator
public DuplicateDelegator(IOptionsServer server)
Instantiate a new DuplicateDelegator, providing the server object that will be used to execute Perforce Helix attribute commands.- Parameters:
server
- a concrete implementation of a Perforce Helix Server
-
-
Method Detail
-
duplicateRevisions
public java.util.List<IFileSpec> duplicateRevisions(IFileSpec fromFile, IFileSpec toFile, DuplicateRevisionsOptions opts) throws P4JavaException
Description copied from interface:IDuplicateDelegator
Duplicate revisions with integration history (unsupported).Duplicate revisions as if they always existed. All aspects of the source revisions are mirrored to the target revisions, including changelist number, date, attributes, and contents. The target revision must not already exist and the target file must not be opened (for any operation) on any client.
Note that integration records are duplicated as well. 'p4 duplicate' followed by a 'p4 obliterate' (of the source revisions) is in effect a deep rename operation, with any source revision in client workspace or labels forgotten. The full semantics of this operation are found in the main 'p4 help duplicate' documentation.
- Specified by:
duplicateRevisions
in interfaceIDuplicateDelegator
- Parameters:
fromFile
- non-null source file.toFile
- non-null target file.opts
- possibly-null CopyFilesOptions object specifying method options.- Returns:
- non-null but possibly empty list of duplicated file info/error messages.
- Throws:
P4JavaException
- if an error occurs processing this method and its parameters.
-
-