开发者

Tool for comparing two versions of the same C++ function given the two source code files

I have a C++ func开发者_如何学Pythontion foo_bar inside the source code file lib.cpp.

I am using a revision control tool (CVS for Windows) and I need to compare foo_bar between two different revisions of lib.cpp, is there any suitable tool for my need?

The tool should be able to properly locate foo_bar inside the two revisions because for example in one revision foo_bar is at the top of the file while in a different revision it is at the bottom of the file.

I am using Visual Studio but it is not integrated with CVS.

Thank you.


You can do it with Araxis Merge. Open two revisions of lib.cpp and add Synchronization Link pointing to foo_bar in both revisions. On the other hand you can use any file comparison tool. Just paste two versions of foo_bar and compare them.


This is called a "diff tool". The one that comes with VS sucks, as does WinDiff.

See this question for some opinions on the best such tools:

https://stackoverflow.com/questions/12625/best-diff-tool


http://www.prestosoft.com/edp_examdiff.asp seems a good tool and I have had no problems with it.


According to answer on my question, you hesitate about if diff tools could locate changes in particular functions.

Well, in 95% free tools (like examdiff) do it very well. Also try plugins listed there:

http://social.msdn.microsoft.com/forums/en-US/vssourcecontrol/thread/96cf363c-5324-475e-b249-85117a98c443


http://tortoisesvn.net/downloads.html has a merge-tool which I think is very good.

Here is how to configure to use together with Visual Studio: http://jeffhandley.com/archive/2010/03/08/tortoisemerge.aspx

I'm aware that you are using CVS and Tortoise is SVN but the merge-tool in tortoise is very good!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜