[p4] How to convert "p4 files" depot filepaths to local machinefilepaths?
Jeff Grills
jgrills at drivensnow.org
Thu Feb 15 12:02:54 PST 2007
"p4 where" is the command you use to map the depot through to the client. If
you're going to parse the output of "p4 where" programmatically (and it
sounds like you are), you'll want to be running a relatively recent server
(2004.2 or newer, IIRC) and use "p4 -ztag where".
"p4 fstat" will also provide client file information, so you may consider
using that instead of the "p4 files" command.
j
-----Original Message-----
From: perforce-user-bounces at perforce.com
[mailto:perforce-user-bounces at perforce.com] On Behalf Of James Edwards
Sent: Thursday, February 15, 2007 1:13 PM
To: perforce-user at perforce.com
Subject: [p4] How to convert "p4 files" depot filepaths to local
machinefilepaths?
Hi, I'm trying to write a script to generate a list of local filepaths from
the list of depot paths produced by the "p4 files" command. Is there some
other p4 command or command option to do this, or is there some way to use
the p4 api to do this? I couldn't find one. As it is, the best I can seem
to do is get the client spec definition and try to manually parse each depot
path and replace the depot root with the local file root, but this operation
gets tricky for multi-line client-view specs where you have to figure out
which of the client-view specification lines applies to a particular depot
filepath.
Thanks for any help,
Kris
More information about the perforce-user
mailing list