[p4] p4 fix doesn't update job?

Gareth Rees gdr at ravenbrook.com
Tue Oct 30 04:52:17 PST 2001


At 16:34 -0500 2001-10-29, Peter Janes wrote:
>I'd like a review daemon to be able to recognize jobs that have been 
>changed since it was last run, and "p4 jobs -e 
>'Modified_Date>={lastrun}'" seems like the way to go [...] However, 
>if a user runs "p4 fix -c changelist jobname", the Modified_Date 
>field doesn't change.

That's right.  "p4 fix" doesn't (in Perforce 2001.1) update "always" 
fields in the job.  This causes some problems for the P4DTI, for 
example <http://www.ravenbrook.com/project/p4dti/issue/job000016/>.

However, there is a better way to discover which jobs have changed 
since your daemon last ran:

See if the Perforce logger is running.  (Run "p4 counters" and see if 
the counter "logger" appears in the output.)  If not, start it by 
running "p4 counter logger 0" (don't start it more than once).

Now, when you run "p4 logger" you'll get a list of events affecting 
jobs and changelists, for example:

   $ p4 logger
   49 job job000123
   50 change 12345
   51 job job000124
   52 change 12346

The output is a list of triples (sequence number, "job" or "change", 
job name or change number).

You can supply a sequence number with the -c option to the logger 
command, for example "p4 logger -c 52" to read only log entries 52 
and higher.  You can clear the log by setting a Perforce counter to 
the highest sequence number, for example "p4 logger -c 52 -t 
my-counter".

See "p4 help undoc" for some information about the logger commands. 
The P4DTI design for using the logger is 
<http://www.ravenbrook.com/project/p4dti/master/design/replicator/#section-2.6>.

P.S. Could you say more about how you plan to use the information you 
get from the log?  It sounds interesting.



More information about the perforce-user mailing list