Reputation: 67
In Git, I can use add to mark a file as merged. In SVN, I can use resolved to mark a file as merged.
But in perforce, I cannot find a command to do this job. Do anyone know if perforce has a command like this?
Update: I'm trying to develop a SCC wrapper for perforce and it can merge files within its environment. But after the merge (not by perforce), how can I tell perforce that this file is already merged and remove the conflict flag?
Upvotes: 1
Views: 1009
Reputation: 951
First you must integrate one file (the source) into the other file (the target).
p4 integrate //depot1/mydir/myfile //depot2/mydir/myfile
To submit the resulting changelist, you must resolve.
The command for each of these is:
p4 resolve -ay //depot2/mydir/myfile
p4 resolve -at //depot2/mydir/myfile
p4 resolve -am //depot2/mydir/myfile
Finally, submit your change:
p4 submit # for default changelist
p4 submit -c 12345 # submit changelist # 12345
(there are additional resolve options that are interactive, outlined here: http://www.perforce.com/perforce/doc.current/manuals/cmdref/resolve.html#1040665
Upvotes: 2
Reputation: 16349
Probably you are looking for 'p4 resolve -am'.
If you provide more information, that would help others give you advice.
Upvotes: 0