Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/mercurial/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mercurial变更集c++;分析 有没有方法来分析C++的变化,例如,函数或类被修改?_C++_Mercurial_Analysis_Changeset - Fatal编程技术网

Mercurial变更集c++;分析 有没有方法来分析C++的变化,例如,函数或类被修改?

Mercurial变更集c++;分析 有没有方法来分析C++的变化,例如,函数或类被修改?,c++,mercurial,analysis,changeset,C++,Mercurial,Analysis,Changeset,我想统计代码某些部分的修订量:方法、类、文件、文件夹等。VCS通常不知道内容,他们知道文本行,其他什么都不知道。要增加对C函数、C++类、FORTRAN子程序/函数的了解的负担,…最后在emacs的土地上。不要去那里…不确定在使用C++时有多好,但是水星可以随意使用Git格式差异。git diff和hg diff都有一个选项来查看进行更改的函数。。。在Mercurial中,您可以使用hg diff-p: > hg diff diff --git a/sandbox/sandbox.cpp

我想统计代码某些部分的修订量:方法、类、文件、文件夹等。

VCS通常不知道内容,他们知道文本行,其他什么都不知道。要增加对C函数、C++类、FORTRAN子程序/函数的了解的负担,…最后在emacs的土地上。不要去那里…

不确定在使用C++时有多好,但是水星可以随意使用Git格式差异。
git diff
hg diff
都有一个选项来查看进行更改的函数。。。在Mercurial中,您可以使用
hg diff-p

> hg diff
diff --git a/sandbox/sandbox.cpp b/sandbox/sandbox.cpp
--- a/sandbox/sandbox.cpp
+++ b/sandbox/sandbox.cpp
@@ -86,6 +103,8 @@
... diff output removed for conciseness

> hg diff -p
diff --git a/sandbox/sandbox.cpp b/sandbox/sandbox.cpp
--- a/sandbox/sandbox.cpp
+++ b/sandbox/sandbox.cpp
@@ -86,6 +103,8 @@ int _tmain(int argc, _TCHAR* argv[])
... diff output removed for conciseness
注意,使用
-p
选项,diff输出的每个块都包括包含函数(
\u tmain
)。请注意,新函数似乎不包含该信息


我不知道你会怎么用这个。也许对包含
@.*\(.*)
的行的输出进行grep以获得函数列表?

谢谢,但我的提示是,是否存在某种方法来分析变更集以获得函数/类或受影响的内容。这样可以使用多种工具,我不知道如何获得。