Search code examples
javaperforceresolve

How to resolve integrated files in Perforce JAVA API


How to resolve integrated files in Perforce JAVA API. I am trying to merge files from one branch to another. I am using following code to merge.

tmpClient.integrateFiles(file,  toFile, "17.2",  opts );

After executing this command, files need to be resolved. How can I do that?


Solution

  • Look at IClient.resolveFile() and IClient.resolveFilesAuto():

    https://www.perforce.com/perforce/r15.1/manuals/p4java-javadoc/com/perforce/p4java/client/IClient.html

    The specific method you use will depend on whether you expect that you will always be able to rely on auto-resolve (which is a bad expectation generally) and what sort of system you have in your app to handle conflicting merges.