[p4] how to get last synced changelist?
xzheng at adobe.com
Tue Mar 24 19:58:32 PDT 2009
I searched the P4 knowledge base and found following answer:
p4 changes -m1 @clientname
It works at most time, however sometimes have problems.
for example, I have synced to @1001 and @1002 before, but it will tell me @1001 is the last synced change list. and when I sync to @1002, it will tell me error: file(s) update-to-date.
the P4 server version we used is as following:
Server version: P4D/SOLARIS10X86_64/2008.1/176084 (2008/11/20)
I am ask this question because we want to implement a Cruise Control based build server, which only pick 1 change list for every build. I use following way to perform this:
1. use "p4 changes -m1 @clientname" to get the last synced CL
2. use "p4 changes //clientname/... at lastCL+1, @now" to get all CLs since last synced CL, then just pick the earliest one to sync.
on CruiseControl build server, we will use this way to check modifications and sync the changes, it works at most time, but if met the above error case, it will keep syncing one changelist and don't go ahead.
More information about the perforce-user