Products > Programming

Comparing source files

(1/7) > >>

I started to write my own solution but this is a universal problem. When comparing two text files, if there are line inserts or deletes, it derails the process. Can anyone suggest a - preferably free - compare tool that will deal effectively with this? Even one that will start off at specified line nos would be a big help. Thanks for any advice.

I'm not entirely sure I understand your issue, but have you tried 'winmerge' for comparing text files


--- Quote from: Psi on March 07, 2024, 09:36:21 am ---I'm not entirely sure I understand your issue, but have you tried 'winmerge' for comparing text files

--- End quote ---

That sounds like something specific to a particular operating system that not everyone uses (and the OP may not).

The standard command line utility 'diff' has existed since AT&T Unix version 6 and appears with minor variations in BSD (e.g. MacOS) and GNU/Linux. Windows users can access it in WSL.

Often "diff3" is more useful, when someone has made a branch from some version of a program, and meanwhile more development has been done on the trunk. When it comes time to merge your changes back to trunk it is better do do a 3-way compare between the current head of trunk, your branch, and the common ancestor.

I think diff3 originates with AT&T version 7, and it's available everywhere also.

git always does 3-way diffs (if one of the versions is not a direct ancestor of the other)

Search for 'diff tool'.
I'm using Meld.

Beyond Compare
it's commercial software for Wintel, but it's light years better than any open source alternative.

It compares files, directories, even trees, has multi-user locks, so you avoid making a mess on files that are opened by others, and your changes remain local, and can be "merged" later, under control (Git, Mercury, Svn, ... Doors-itself) anyway  ... and ' scriptable, it can be used to generate patches, and has plug-ins for integration into Understood{C, C++, Ada}, Doors and Stood AADL, AdaMulti, which are "versioned" professional work environments designed for team-working.

When I was a student, I got my Educational version of Beyond Compare for 50 euro. Still usable for personal stuff.


[0] Message Index

[#] Next page

There was an error while thanking
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod