5

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.

fbrereto
  • 35,429
  • 19
  • 126
  • 178
  • 2
    Have you tried `p4 annotate -i` or `p4v`'s Time-Lapse View with "Show Branch History" enabled? – jamesdlin Jun 28 '13 at 06:53
  • The version I am interested in is `p4 annotate -I`, which is the deep version, but yes that's exactly what I wanted. Can you make it an answer so I can give you proper credit? – fbrereto Jun 28 '13 at 16:51

1 Answers1

4

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.

jamesdlin
  • 81,374
  • 13
  • 159
  • 204