Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the p4 command equivalent to something like svn status [duplicate]

Tags:

perforce

Possible Duplicate:
How to find untracked files in a Perforce tree? (analogue of svn status)

I want to know what p4 command that will show me which files have changed, which files are not checked in, etc.

like image 649
zzztimbo Avatar asked Mar 09 '12 23:03

zzztimbo


3 Answers

If you're using perforce properly, "p4 opened" is what you're looking for. It will tell you what files you have opened for change. If you want to be able to change files locally, THEN open them for edit (or delete, etc.,) then you're walking out of the usage patterns that perforce expects users to abide by and you're treading on dangerous ground.

Perforce does provide mechanisms that will allow you to detect these things - if you're going to insist on working this way. "p4 fstat" will allow you to get the expected md5sum for a file from the server. Comparing that with the local md5sum will tell you if the file has changed. You could, alternatively, compare file dates - if the modification date on your local machine does not match that given by fstat, you can be fairly certain that it has changed, but to be certain, you'd have to do the md5sum check.

like image 167
Sniggerfardimungus Avatar answered Oct 11 '22 16:10

Sniggerfardimungus


In the upcoming 2012.1 release there a new command named p4 status that will do the equivalent to that as if you were using SVN.

p4 status 
src/tools/this.rb - reconcile to edit //depot/stuff/src/tools/this.rb#3 
src/tools/that.rb - reconcile to add //depot/stuff/src/tools/that.rb#1 
src/tools/other.rb - reconcile to delete //depot/stuff/src/tools/other.rb#2

For more information, read the announcement on the Perforce Blog.

like image 28
Dennis Avatar answered Oct 11 '22 16:10

Dennis


While awaiting the official 2012.1 release you have basically two options:

  • Do it yourself using the command line
  • Use P4Vs "Reconcile Offline Work"

More details can be found in the Perforce KB.

like image 22
rjnilsson Avatar answered Oct 11 '22 16:10

rjnilsson