2

i want to implement below p4 commands in a batch file.

Now i want to implement everything in a job service of .net using p4.net api.

To do in .net using p4.net api:

1)First sync files or latest files at workspace path.

2)Create a new Change List

3)Revert all files if there is any change in above changelist

4)Now actually opening files for edit at destination workspace path of particular file format in above changelist

5)Copy files from server source path to local workspace destination path and copy should happen recursively from server source path to destination path of particular file format like gp*.* files from source to destination

6)Revert unchanged files in above changelist

7)Now run perl command using above changelist.

Batch File:

SET P4CLIENT=deep_abc
SET P4PORT=p4ww:2012
SET SRC="\\ServerPath"
SET DEST="\\LocalPath\resources"
SET DPATH=D:
SET AS2="D:\as2\beta_0.4\bin"

%DPATH%
cd %DEST%
pause
p4 revert -c 19239674 file ...
pause
p4 edit -c 19239674 GP100*.*
pause
robocopy %SRC% %DEST% *.rom
pause
p4 revert -a 19239674 file ...
pause
%DPATH%
cd %AS2%
pause
perl as2.pl -c %P4CLIENT% submit -t -c 19239674
pause
Ethaan
  • 11,291
  • 5
  • 35
  • 45
test
  • 91
  • 11
  • What precisely is your question? How to write a batch file? How to write a p4api.net program? How to call a perl program? If you are already writing perl programs which communicate with Perforce, why not write all of your Perforce tools using perl and the p4perl api? – Bryan Pendleton Jan 25 '15 at 17:23
  • @BryanPendleton. Yes I want to know how i can convert this batch file into p4api.net program. – test Jan 25 '15 at 18:27
  • The batch file contains p4 commands like to create a changelist, open for edit changelist, revert files that are unchanged and then submit that changelist using perl command. This perl command is basically to submit a changelist at some farm where multiple tests will be run on the changelist which is sent along with the perl command. So in my p4api.net program, along with p4 command from batch file, i ll have to also call perl command. – test Jan 25 '15 at 18:30
  • Once all the sanity test passes in farm (which i sent using perl command), it will automatically submit or commit the changes or change list to perforce server location. – test Jan 25 '15 at 18:33

0 Answers0