bulkcheckin.il #1

  • //
  • guest/
  • robert_yu/
  • perforce/
  • cdsp4/
  • release/
  • 2.2/
  • Skill/
  • Toolbox/
  • bulkcheckin.il
  • View
  • Commits
  • Open Download .zip Download (2 KB)
procedure(CDS_P4BulkCheckin(libname description)


let( (client cmd libid liblist)


	if(libname == "all"
	then
	liblist=ddGetLibList()
	else
	liblist=list(ddGetObj(libname))
        )	  

	foreach(lib liblist
	
	when(ddGetObjDMSys(lib)  == "p4" && lib~>p4CheckinType == "Bulk"

	printf("Working on %s\n" lib~>name)

	libid=lib
	client = CDS_P4GetClient(libid)


     ;; add any files that may be hanging about
	     ;; since we have disabled p4 add and edit for bulk mode
	     tmpfile = sprintf(nil "/tmp/bulkadd.%d" ipcGetPid())
	     cmd2 = "grep -v cd% | grep -v cd- | grep -v cd? | grep -v cdslck"
	     sprintf(cmd "find %s -type f | %s > %s ; p4 -x %s -c %s add > /dev/null; rm %s"
		     CDS_NFSSimplify(libid~>writePath) cmd2 tmpfile tmpfile client tmpfile)
	println("Adding new files, please wait, this will take time...")
	     println(cmd)
        CDS_IPCCommand(cmd)

	;; now do the diff
	sprintf(cmd "p4 -c %s diff -se > /tmp/p4diffse.%d ; p4 -x /tmp/p4diffse.%d -c %s edit " client ipcGetPid() ipcGetPid() client)
	println("Diffing objects, please wait, this will take time...")
	println(cmd)
	CDS_IPCCommand(cmd)
	;; now find the deleted files
	sprintf(cmd "p4 -c %s diff -sd > /tmp/p4diffsd.%d ; p4 -x /tmp/p4diffsd.%d -c %s delete " client ipcGetPid() ipcGetPid() client)
	println("Looking for deleted files...")
	println(cmd)
	CDS_IPCCommand(cmd)
	;; now do the submit
	sprintf(cmd "p4 -c %s change -o | sed 's/<enter description here>/cds:Bulk %s/g' | p4 -c %s submit -i > /dev/null" client description client)
	println(cmd)
	 CDS_IPCCommand(cmd)
	)
	)	
)
)
	
# Change User Description Committed
#1 4529 robert_yu p4 integrate from public/perforce/cdsp4/release/2.2/...
//guest/perforce_software/cdsp4/release/2.2/Skill/Toolbox/bulkcheckin.il
#1 1675 Shiv Sikand New 2.2 tree