-1

I'm interested in one C/C++ function and want to check its complete history of changes made from beginning to current. Other words, I want to see the CLs (ChangeLists) which add, modifies a specific function or variable. Thanks in Advance.

Perforce command line or GUI

πάντα ῥεῖ
  • 1
  • 13
  • 116
  • 190

1 Answers1

1

In P4V you can use the Time-Lapse View tool to see the complete history of a file. https://www.perforce.com/manuals/p4v/Content/P4V/advanced_files.timelapse.html

As long as the function in question has stayed in the same general position in the file, it's pretty easy to follow its history by scrubbing through the file's timeline.

If you're looking for a more automated solution where you could provide a function name and get a list of changelists out rather than having to examine the file visually, p4 annotate -a would be the starting point, but Perforce doesn't include any tools that would be able to specifically limit the query to a particular C++ structure, so you will need to supply or build your own tooling on top of what annotate provides.

Samwise
  • 68,105
  • 3
  • 30
  • 44