p4 copy
Synopsis
Copy files from one location in the depot to another.
Syntax
p4 [g-opts
] copy [-cchange
] [-n -f -v -q] [-mmax
]fromFile
[rev
]toFile
p4 [g-opts
] copy [-cchange
] [-n -f -v -q] [-mmax
] -bbranch
[-r] [toFile
[rev
] ...] p4 [g-opts
] copy [-cchange
] [-n -f -v -q] [-mmax
] -bbranch
-sfromFile
[rev
] [toFile
...] p4 [g-opts
] copy [-cchange
] [-n -f -v -q] [-mmax
] -Sstream
[-Pparent
] [-Fr] [toFile
[rev
] ...]
Description
Using the client workspace as a staging area, the p4 copy
command propagates an exact copy of the source files to the specified
target by branching, replacing, or deleting files. No manual resolve is
required. Changes in the target that were not previously merged into the
source are overwritten. To update the target, submit the files. To
revert copied files use the p4 revert
command.
Target files that are identical to the source are not affected by the
p4 copy
command unless you use the -f
option. When p4
copy
creates or modifies files in the workspace, it leaves them
read-only; you can use p4 edit
to make them writable.
Options
|
Specify a branch view to be used to determine source and target files. |
|
Open the files in the specified pending changelist rather than in the default changelist. |
|
Force the creation of extra revisions in order to explicitly record that files have been copied. Deleted source files are copied if they do not exist in the target, and files that are already identical are copied if they are not connected by existing integration records. |
|
Force copy operation; perform the operation when the target stream is
not configured to accept a copy of the source. To determine a
stream’s expected flow of change, use |
|
Specify the maximum number of files to copy, to limit the size of the operation. |
|
Preview the copy. |
|
Specify a target stream other than the parent of the source stream.
Requires |
|
Quiet mode; suppress normal output messages about the list of files being integrated, copied, or merged. Messages regarding errors or exceptional conditions are displayed. |
|
Reverse the mappings in the branch view, integrating from the target
files to the source files. Requires the |
|
Treat |
|
Specify the source stream. Changes are copied to its parent. You can
use the |
|
Do not sync the target files. By default, If a large number of files is involved and you do not require the files
to be present in your workspace, you can minimize overhead and network
traffic by specifying |
|
See “Global Options”. |
Usage Notes
Can File Arguments Use Revision Specifier? | Can File Arguments Use Revision Range? | Minimal Access Level Required |
---|---|---|
|
No |
|
You can use a revision specifier to select the revision to copy; by
default, the head revision is copied. The revision specifier can be used on
fromFile
or toFile
, but not on both. When used on toFile
, it
refers to source revisions, not to target revisions. You may not use a
range as a revision specifier.
Examples
p4 copy -S //projectX/dev/... |
Promote work from a development stream to the mainline. |