SpecMgr subclass for Jobs. Because you can have
a huge number of jobs, we use "p4 jobs -e" to grab only the jobs
that have changed since our saved timestamp. We use SpecMgr rather than GenSpecMgr for reasons I don't really remember.
Main interface method. Saves each of the modified jobs.
# File specsaver.rb, line 518
def update( since )
list_specs( since ).each do
|spec|
save_spec( "job", spec )
end
submit( description() )
end
Protected Instance methods |
Get a list of jobs modified since the saved timestamp
# File specsaver.rb, line 531
def list_specs( stamp )
@p4t.run_jobs( "-e", "#{JOB_DATE_FIELD} > #{stamp}" )
end
Locate the workspace file for a given job
# File specsaver.rb, line 538
def spec_file( spec )
@root + "/jobs/" + spec[ "Job" ]
end
Provide the description for changelist and stdout.
# File specsaver.rb, line 545
def description
"Archive updated jobs"
end