Alessandro Jacopson
Alessandro Jacopson

Reputation: 18675

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

I have a C++ function 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.

Upvotes: 1

Views: 2066

Answers (5)

Lucian
Lucian

Reputation: 3554

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!

Upvotes: 0

ks1322
ks1322

Reputation: 35815

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.

Upvotes: 1

Dewfy
Dewfy

Reputation: 23644

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

Upvotes: 0

Ed Heal
Ed Heal

Reputation: 60017

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

Upvotes: 0

Merlyn Morgan-Graham
Merlyn Morgan-Graham

Reputation: 59131

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

Upvotes: 0

Related Questions