英文:
How to get complete change history of any function or variable in perforce? (OR) CLs which has changed a function or variable?
问题
我对一个C/C++函数感兴趣,想要检查它从一开始到现在所做的完整更改历史记录。换句话说,我想看到添加、修改特定函数或变量的CL(更改列表)。提前感谢。
Perforce命令行或GUI
英文:
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
得分: 1
在P4V中,您可以使用Time-Lapse View工具查看文件的完整历史记录。 https://www.perforce.com/manuals/p4v/Content/P4V/advanced_files.timelapse.html
只要所涉及的函数在文件中的大致位置保持不变,通过浏览文件的时间线来跟踪其历史记录就相当容易。
如果您正在寻找一种更自动化的解决方案,您可以提供一个函数名称并获取一个变更列表,而不必在视觉上检查文件,p4 annotate -a
将是起点,但Perforce不包括任何能够专门限制查询到特定C++结构的工具,因此您需要提供或构建自己的工具,以基于annotate
提供的内容进行操作。
英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论