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
You can also use the short version
p4 changes -m1 #have
if you don't want to specify the directory.If you are using a shell for which "
#
" is a comment character like bash, remember to escape it as follows:p4 changes -m1 \#have
In my case, I just want to know what changelist number is opened (not syned to) in a specific directory. For that, I do:
If your build system always syncs to head on the directory before building, you can use
p4 changes -m 1 //path/to/your/project/...
to get the head changelist number for that directory.If you go with this method, I would suggest running the changes command before syncing, and then explicitly syncing to that changelist. That should eliminate the chance of someone checking in between the changes command and the sync command.
In P4V client you can:
Submitted
tabFiles
underFilter:
dropdownCurrent depot or workspace tree selection
Change
and the top line will be your answerAlso, 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.I use the "lazy manual way" (aka I don't know better) within the P4V client:
Use this in the "Submitted" tab filters: //yourproject/...#>have And it will show you which CLs you haven't synched, note the oldest one. Remove the #>have filter and see what's the CL that came before the one you just noted.