8 messages in com.perforce.perforce-user[p4] Determining client directory fro...
FromSent OnAttachments
Bob Arnson01 Sep 2002 22:07 
Patrick Bennett01 Sep 2002 22:38 
Jo Woodison01 Sep 2002 23:18 
Bob Arnson02 Sep 2002 08:03 
Stephen Vance04 Sep 2002 03:49 
Bennett, Patrick04 Sep 2002 07:18 
Bob Arnson04 Sep 2002 09:14 
ste...@vance.com04 Sep 2002 11:54 
Subject:[p4] Determining client directory from depot directory?
From:Bob Arnson (perf@bobs.org)
Date:09/01/2002 10:07:38 PM
List:com.perforce.perforce-user

I'm writing a tool to let users diff their client tree against the head revisions in the depot. The approach I'm using is to throw up a dialog box with a tree representing the depot, clone the user's current clientspec, sync it, and run a diff tool capable of diffing trees.

It works, but I'd like to optimize it. Currently, I run the diff tool against the root of both clients. That's a lot of unnecessary diffing. Eventually, I'd like to rewrite it to diff just opened files. In the meantime, I'm looking to restrict the diffing to just the trees of interest. So far, the only way I've found -- short of interpreting the clientspec view mapping -- is to do a "files //depot/path/*" and then an "fstat -C //depot/path/firstFile". (I know that if the user's clientspec maps subordinate files outside that tree, it won't diff them, but I'm willing to live with that limitation.)

Can anyone think of any quicker way to map from a depot directory to a client directory?