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
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.
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 .
Move opened files between changelists or change the files' type , or move the client's stream spec to a different changelist .
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With