procedure(CDS_P4StartAutoSync() ;_Jun 27 01 sikand 641
; start the autosyncer processes
let(( client cmd liblist)
;; 5 minute default auto sync interval
CDS_P4DefaultAutoSyncInterval = 300;
unless( boundp('CDS_P4RunAutoSync)
CDS_P4RunAutoSync = t
)
if( CDS_P4RunAutoSync then
liblist = ddGetLibList()
foreach( lib liblist
when( ddGetObjDMSys(lib) == "p4" && lib~>p4CheckinType !="Bulk"
client = CDS_P4GetClient(lib)
cmd = sprintf(nil "cdsautosync %s %d %d" client CDS_P4DefaultAutoSyncInterval ipcGetPid())
;; make sure we don't duplicate
when( boundp('CDS_IPCTable)
id = CDS_IPCTable[cmd]
when( boundp('id)
if( ipcIsAliveProcess(id) then
;; kill it
printf("Killing old autosync process for lib %s\n" lib~>name)
ipcKillProcess(id)
)
) ; ** when id **
) ; ** when boundp **
printf("Starting autosyncer for lib %s, interval %d\n"
lib~>name CDS_P4DefaultAutoSyncInterval)
CDS_IPCNoWaitCommand(cmd)
t
) ; ** when ddGetObjDMSys **
) ; ** foreach lib **
else
printf("Autosync is disabled\n")
) ; ** if CDS_P4RunAutoSync **
t
) ; ** let **
) ; ** procedure CDS_P4StartAutoSync **
procedure(CDS_P4StopAutoSync() ;_Jun 26 01 sikand 0
let(()
foreach( elem CDS_IPCTable~>??
when( stringp(elem)
when( rexMatchp("cdsautosync" elem)
ipcKillProcess(CDS_IPCTable[elem])
)
)
) ; ** foreach elem **
t
) ; ** let **
) ; ** procedure CDS_P4StopAutoSync **