[p4perl] integrating perforce with a build system.
roger.day at globalgraphics.com
Mon Feb 21 05:03:41 PST 2005
Ok, I've found SetCWD("<some folder name>") which i'm assuming will do the
O'wise, on talking with a coworker, it appears that sync takes arguments
may do what I want.
<roger.day at globalgr To: Tony Smith <tony at smee.org>
aphics.com> cc: p4perl at perforce.com, "Roger Day" <roger.day at globalgraphics.com>
Subject: Re: [p4perl] integrating perforce with a build system.
Is the depot on the server or the client?
How do I tell it the directory on the client I want it synchronised to?
<tony at smee.org> To:
p4perl at perforce.com
cc: "Roger Day"
<roger.day at globalgraphics.com>
17/02/2005 18:06 Subject: Re: [p4perl]
integrating perforce with a build system.
> I'm looking at integrating perforce with our in-house build scheduling
> system. Our build scripts are written in Perl and I've installed the P4
> win32 perl code and the test examples work. However I'm a newbie to
> Our internal build system creates a fresh set of sources every day timed
> for midnight. To do this, the build scripts instruct the SCM system to
> download a clean set of sources into an empty directory (the sources
> include the build tools neccessary for building those sources). So
> essentially my problem is for a P4 client (in this case, in the form of
> P4Perl) to connect to a P4 server and synchronize a given "depot" to a
> given (empty) folder on the file system. I looked at the P4Perl modules
> but I didn't see any code to hand to do this task. Is there an easy way
> doing this in the perl API?
In Perforce, that's called 'syncing' your workspace with the depot. If you
were using the Perforce command line client you'd run:
p4 sync -f
to force the sync even if Perforce thinks you already have the files in
In P4Perl that becomes:
$p4->Sync( "-f" );
Good luck with the integration!
More information about the p4perl