[p4] How to convert "p4 files" depot filepaths to local machinefilepaths?

Dave Lewis dlewis78731 at gmail.com
Thu Feb 15 14:17:51 PST 2007


maybe easier, if the files are on the client, "p4 have"  lists them in
both depot and client syntax

dave

On 2/15/07, James Edwards <krissieboy2001 at yahoo.com> wrote:
> Thanks so much, that is *exactly* what I was looking for!
>
> Kris
>
> ----- Original Message ----
> From: Brad Holt <brad.holt at autodesk.com>
> To: James Edwards <krissieboy2001 at yahoo.com>; perforce-user at perforce.com
> Sent: Thursday, February 15, 2007 11:27:10 AM
> Subject: RE: [p4] How to convert "p4 files" depot filepaths to local machinefilepaths?
>
>
> If I'm understanding you right, then you would want to take a look at
> "p4 where":
>
>     p4 where [ file ... ]
>
>         Where shows how the named files map through the client view.
>         For each argument, three names are produced: the name in the
>         depot, the name on the client in Perforce syntax, and the name
>         on the client in local syntax.
>
>         If no file is given, the mapping for '...' (all files in the
>         current directory and below) is shown.
>
>         Note that 'p4 where' does not determine where any real files
> are.
>         It only computes where they should be according to the client
> view.
>
> I recommend using the "-ztag" flag to oraganize the output a bit.
> Without it, the 3 paths are just space separated which makes parsing a
> bit tricky if there are folder/file paths with spaces in them.
>
>
> -----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 11:13 AM
> 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
>
>
>
> ________________________________________________________________________
> ____________
> Now that's room service!  Choose from over 150,000 hotels
> in 45,000 destinations on Yahoo! Travel to find your fit.
> http://farechase.yahoo.com/promo-generic-14795097
>
> _______________________________________________
> perforce-user mailing list  -  perforce-user at perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user
>
>
>
> ____________________________________________________________________________________
> TV dinner still cooling?
> Check out "Tonight's Picks" on Yahoo! TV.
> http://tv.yahoo.com/
>
> _______________________________________________
> perforce-user mailing list  -  perforce-user at perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user
>


More information about the perforce-user mailing list