Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get the changelist number of current workspace directory

Tags:

perforce

Each time we do a build, we have to record the changelist number of source files for tracking. We have different projects (under different directories) and they are synced at different changelist number. May you please show me how can we get the changelist number of a specific directory?

Any suggestions are appreciated. Thanks and Best Regards

like image 691
Dien Nguyen Avatar asked Mar 16 '12 03:03

Dien Nguyen


People also ask

What is a Changelist in perforce?

When you check out a file, Perforce adds information about the file to a changelist and changes the writable attribute of the file in your local workspace from read-only to read/write. A changelist defines a logical grouping of work across a set of files and folders.

What does p4 status do?

The p4 status command finds unopened files in a client's workspace and detects the following three types of inconsistencies between your workspace and the depot: Files present in the depot, present in your have list, but missing from your workspace. By default, these files are then opened for delete .

What does p4 reopen do?

Move opened files between changelists or change the files' type , or move the client's stream spec to a different changelist .

What is p4 client?

The p4 client command puts the client spec into a temporary file and invokes the editor configured by the environment variable P4EDITOR . For new workspaces, the client name defaults to the P4CLIENT environment variable if set, or to the current host name. Saving the file creates or modifies the client spec.


1 Answers

Also, there's p4 changes -m1 //path/to/your/project/...#have which, if run in the client workspace that synced the files for building, will give you the highest changelist number of the files in the workspace.

like image 130
user1054341 Avatar answered Sep 20 '22 16:09

user1054341