Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Perforce auto resolve from the command line?

Tags:

perforce

p4v

P4V has been crapping out on me when attempting to resolve a large number of files as part of an integration. I want to be able to do this in the command line.

Here's the steps in P4V:

  1. Right-click the CL.
  2. Choose "Resolve Files..." A dialog will appear.
  3. Choose "Merge yours and theirs if no conflicts exist".
  4. Click Auto.

Can someone translate this into a p4 command line command with correct arguments?

like image 668
Fostah Avatar asked Jul 27 '09 14:07

Fostah


People also ask

What does perforce resolve do?

Use p4 resolve to combine the contents of two files or file revisions into a single file revision in your workspace. When p4 resolve is run with no file arguments, it operates on all files in the client workspace that have been scheduled for resolve.

What is p4 reconcile?

The p4 reconcile command produces output in depot syntax. To see file names and paths in local syntax, use the -l option with p4 reconcile or use p4 status . When called without arguments, p4 reconcile opens the files in a changelist. To preview an operation, use the -n option with p4 reconcile or use p4 status .

What does p4 Sync do?

p4 sync brings the client workspace into sync with the depot by copying files matching its file pattern arguments from the depot to the client workspace. When no file patterns are specified on the command line, p4 sync copies a particular depot file if it meets all three criteria: Visible through the client view.

What is depot in perforce?

The Helix Server stores files in shared repositories called depots. By default, there is one local depot named depot on every Helix Server installation. To create or edit a depot, use p4 depot depotname and edit the fields in the depot spec form.


1 Answers

You can use p4 resolve -am [file ...] which will skip the files with conflicts.

If you specify a file, you will work on that file only. If you specify ..., you will work on files below your working directory. If you do not specify a file, it will work on all of the files in your workspace.

like image 142
akf Avatar answered Oct 09 '22 19:10

akf