Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Perforce: Is there a straightforward way to track a code change to the original submission?

I have a source file //code/main/Foo.cpp whose line N was changed. After a combination of p4 annotate and p4 filelog, I found the change came in from a branch. (This is my understanding of e.g., git blame.)

Drilling into that branch I again used a combination of p4 annotate and p4 filelog to find the line change came from an integration from yet another branch.

Drilling into that branch I again used a combination of p4 annotate and p4 filelog to find the actual changelist that contained the original submission that eventually led to changing line N in //code/main/Foo.cpp.

Is there no easier way to do this? I would like to point to a line in a file and say, "Where and when did that line first appear as currently written in the depot?"

What I want, then, is a deep git blame that traces a change all the way back to its origination.

like image 205
fbrereto Avatar asked Oct 03 '22 16:10

fbrereto


1 Answers

You can use p4 annotate -i to follow history if the file was branched and p4 annotate -I to follow history from integrations to the file.

like image 162
jamesdlin Avatar answered Oct 12 '22 01:10

jamesdlin