Reputation: 570
I am trying to do a p4 merge through command line but none of the arguments I see in the documentation actually seems to work to take the current CL I need to specify it manually with -c. Is there any way to merge from current CL (whatever that is) to child? I thought p4 merge
without arguments would do it but it is not the caseas I get the Missing/wrong number of arguments.
Error
Upvotes: 1
Views: 1689
Reputation: 71464
The -c
option specifies the pending changelist that the target files will be placed into, not the submitted changelist(s) that will be used as the source of the merge. If this option is not used, files are opened in the default changelist (which will become a numbered changelist when you run either p4 change
or p4 submit
).
The default behavior of most commands (including p4 merge
) is to use the latest revisions/changelist. To merge to the current stream from its parent just do p4 merge
. It is not necessary to specify the changelist. If you do need to specify a changelist, use an optional revision specifier, e.g. p4 merge @someChange
. (Note: if you're using an old version of Perforce, specifying the child stream is necessary rather than having it inferred as being the one associated with the current workspace -- use -S currentStream
.)
See p4 help merge
for more information on what the different flags to p4 merge
do, and p4 help revisions
for information on revision specifiers in general.
Upvotes: 2