5 messages in com.perforce.perforce-user[p4] grep all revisions
FromSent OnAttachments
Matthew Henry14 Aug 2003 09:10 
Jack Tan14 Aug 2003 11:00 
Matthew Rice14 Aug 2003 11:41 
Matthew Rice14 Aug 2003 12:10 
Noel Yap14 Aug 2003 12:16 
Subject:[p4] grep all revisions
From:Noel Yap (Noel@morganstanley.com)
Date:08/14/2003 12:16:27 PM
List:com.perforce.perforce-user

At one point I was thinking that if Perforce supported WebDAV, one could, in
theory, mount the repository onto the filesystem and do something like:

find /perforce-webdav-depot -type f | xargs grep 'Funky Chicken'

Does anyone know if Perforce supports WebDAV?

Thanks, Noel

Matthew Rice wrote:

Matthew Henry <matt at iliumsoft.com> writes:

Yes, I could determine exactly what version they are running and sync to that and search the files, but I'd be nifty to have a quick 'n' easy way to just search all versions of all files in that directory for the words "Funky Chicken".

Hi Matthew,

The quickest and easiest way would be to go onto the server and do something like:

find $P4ROOT -type f -print | xargs grep -l 'Funky Chicken'

Once you know the file, you could either look in the RCS file to see which revisions have the string and match that to Perforce revisions [not too difficult] or 'p4 print/sync' each revision to see where it is.

Otherwise, you'd have to do a loop around each revision of a file and run 'p4 print' and grep through that. That would be much slower.

HTH,