Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Perforce - How to get the list of files that have been modified locally?

Tags:

I am looking for a perforce command to get the list of the files that have been modified locally and "not" checked-in to the repository.

I understand that I "should" get the list of modified files in Pending changelist, but there are scenarios when I don't get to see a modified file in that list. And then on "manually" checking out a file and doing a diff i realize the difference.

Is there any command that could check all the files in a given folder and provide me a list of files that are not same as there state in the repository?

I tried "p4 sync", but that did not work.

Thanks for your interest.

like image 894
Manish Basantani Avatar asked Sep 12 '11 10:09

Manish Basantani


People also ask

What does clean do in Perforce?

The p4 clean command takes the following actions when finding inconsistencies between files in a user's workspace and corresponding depot files: Files present in the workspace, but missing from the depot are deleted from the workspace.

What is p4 reconcile?

p4 reconcile. Open files for add, delete, or edit to reconcile a workspace with changes made outside of Helix Server. You might need to use this command after working offline from Helix Server. p4 rec is a synonym for p4 reconcile .

What is p4 shelve?

Description. The p4 reshelve command copies shelved files from an existing shelf into either a new shelf or one that has already been created. This command leaves the source shelf intact. If a file pattern is specified, p4 reshelve shelves the files that match the pattern.

What does p4 change do?

p4 change brings up a form for editing or viewing in the editor defined by the environment variable P4EDITOR . When no arguments are provided, this command creates a numbered changelist. All files open in the default changelist are moved to the numbered changelist.


2 Answers

Try

p4 diff -f -sa 

(see manual for further details)

like image 159
beny23 Avatar answered Sep 30 '22 11:09

beny23


I use "p4 revert -n ./..."

where

-n

List the files that would be reverted without actually performing the revert.

This lets you make sure the revert does what you think it does before actually reverting the files.

like image 34
Vivek Avatar answered Sep 30 '22 13:09

Vivek