Tuesday, June 21, 2016

Perfoce resolve after merge

Perforce is a nice tool. We do lots of merges and it's really handy to know few commands when you resolve. Otherwise opening each and every file in the tool and accept merge is a hassle. If you anyway , takes accept merge when there are no conflicts, then best way to resolve using a command as whole change list


below is the way to run command.
eg: you may need to resolve chnagelist 210153

>p4 resolve -am -c 210153


this will produce an output for each file inside the change list as below.

========================================================

d:\Test.java - merging //Source_Code/Test.java#2
Diff chunks: 13 yours + 2 theirs + 3 both + 0 conflicting
//Test1.java - merge from //Source_Code/Test1.java
d:\Sample.java - merging //Source_Code/Sample.java#46
Diff chunks: 30 yours + 0 theirs + 1 both + 0 conflicting
//ServerError.properties - ignored //Source_Code/ServerError.properties
================================================

* if you resolve single file

>p4 resolve -am "d:\work\.classpath"

====================== output may look like below================
d:\work\.classpath - merging //Source_Code/.classpath#2
Diff chunks: 1 yours + 1 theirs + 0 both + 0 conflicting
//WORKSPACE/work/.classpath - merge from //Source_Code/.classpath








No comments:

Post a Comment