[p4] Find In Files
Jeff A. Bowles
jab at pobox.com
Tue Apr 22 08:48:35 PDT 2008
With a little programming, you could create a script that uses "p4 print -q"
and tagged output to find the file / line you seek.
In fact, with P4Perl / P4Ruby and a little time, it's not hard at all.
The main thing - it's a biggie - is that it really should be a server-side
primitive. Transferring the top revision of each [candidate] file is a
messy affair, performance-wise, and you might want to wander through
multiple revisions of the same file also.
-Jeff Bowles
On Tue, Apr 22, 2008 at 6:49 AM, Todd Zarnes <todd.zarnes at activant.com>
wrote:
> This only displays lines of text where the word is found...no indication
> of what file it is contained in. Another tool I once supported had a
> pretty good approach to Find in Files where you can open a 'Check Out'
> of all files in a given directory that contains the word you search on.
>
>
> Todd
>
> ________________________________
>
> From: Nittin chawala [mailto:nittinchawala at yahoo.co.in]
> Sent: Monday, April 21, 2008 10:41 PM
> To: Todd Zarnes; perforce-user at perforce.com
> Subject: Re: [p4] Find In Files
>
>
>
> You may try:
>
>
>
> p4 print -q <//depot/path/of/where/you/want/to/search/...> | grep
> "pattern"
>
> --
>
>
> Todd Zarnes <todd.zarnes at activant.com> wrote:
>
> Is there a Perforce way to search for a keyword within a
> file...or an
> easy trick besides performing a sync to head on a branch and
> doing a
> windows local search?
>
> ToddZarnes | Activant Eclipse | SCM Manager | Tel: 303.938.8801
> Ext:
> 1544
>
>
> Notice: This transmission is for the sole use of the intended
> recipient(s) and may contain information that is confidential and/or
> privileged. If you are not the intended recipient, please delete this
> transmission and any attachments and notify the sender by return email
> immediately. Any unauthorized review, use, disclosure or distribution is
> prohibited.
> _______________________________________________
> perforce-user mailing list - perforce-user at perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user
>
>
>
>
>
> ________________________________
>
> >From Chandigarh to Chennai - find friends all over India. Click here.
> <http://in.rd.yahoo.com/tagline_groups_10/*http:/in.promos.yahoo.com/gro
> ups/citygroups/<http://in.rd.yahoo.com/tagline_groups_10/*http:/in.promos.yahoo.com/groups/citygroups/>
> >
>
>
> Notice: This transmission is for the sole use of the intended recipient(s)
> and may contain information that is confidential and/or privileged. If you
> are not the intended recipient, please delete this transmission and any
> attachments and notify the sender by return email immediately. Any
> unauthorized review, use, disclosure or distribution is prohibited.
> _______________________________________________
> perforce-user mailing list - perforce-user at perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user
>
--
---
Jeff Bowles - jeff.a.bowles at gmail.com
More information about the perforce-user
mailing list