Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find when specific line was introduced?

Tags:

perforce

In my codebase; I see line <123> is in a specific file; and i'd like to see when it was introduced. I can do 'p4 annotate' to find when it was last modified; but i'm sure there is a way to step back to introduction.. I'm using 2009.2; not the latest if that matters...

-Chris

edit

This was probably a bad question; I solved my problem by walking back the tree until finding where it was added, basically..

p4 annotage | grep

p4 annotage myFile#rev-1 | grep

p4 annotage myFile#rev-1 | grep

like image 526
wom Avatar asked Dec 17 '22 07:12

wom


1 Answers

If you have p4v installed, you should use the time-lapse view. That will give you an accounting of all lines in the file, who introduced or changed those change, what changelist, etc. Timelaspse is an awesome tool and will give you what you need without needing to resort to grepping through old versions.

like image 176
Mark Avatar answered Jan 22 '23 01:01

Mark