简体   繁体   中英

Perforce, Linux - grep for content in deleted depot files

Would like to know how can I grep information in depot deleted files. At first, I found that perforce supports searching file contents like so:

p4 grep -i -n -e "infoSearch" //depot/alex/moreStuff/...

from testing it seems that with the command above it won't search the "deleted" files of the provided location above. P4 help page won't give me much info on how can I do it either. ( p4 grep )

Wondering how can I do it then? Maybe I've missed something or do not understand..

Environment used:

  • Linux OS, command line interface;
  • Perforce version used: Perforce Visual Client/LINUX26X86_64/2013.4/760166

Did you try the -a option?

        The -a flag searches all revisions within the specified range. By
        default only the highest revision in the range is searched.

Remember that a deleted file is just a file with a deleted revision at #head ; all the old revisions are still there! The only reason p4 grep doesn't search them by default is that by default it only operates on the head revision.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM