Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to search a string in the whole history in perforce

Problem is: I was told that there was once a code containing string "SOMESTRING" existed before and I want to get that snippet. The way I can think of now is to open P4WEB and open changelisht one by one and press Ctrl-F to let the browser search for me. But there are hundreds of changelist in history, I don't want to do this hundreds of times in order to search one string. Is there any way to do it faster like search in the whole history of the codes whether some change contains that string?

like image 453
Peiti Li Avatar asked Sep 04 '12 20:09

Peiti Li


People also ask

How to search in perforce?

Go to Search > Find File. The Find File tab opens in the right pane. On the Find File tab in the right pane, under Search in, enter the directory path you want to search. You can drag and drop the file path from the Depot or Workspace Tree in the Tree pane.


1 Answers

Use p4 grep it can search the whole history.

like image 173
Peiti Li Avatar answered Oct 04 '22 02:10

Peiti Li