Does anyone know a good free file compare utility for ASCII files?
The feature that I really need is a specifiable comment character-
i.e., "lines that start with ' should be excluded from comparison
until a new line is reached". I'm recommenting and refactoring
old code, and I need a way to see what's changed in type 1
between versions A and B so that I can upgrade types 2 and 3
from their current version to their next version.
>
> Does anyone know a good free file compare utility for ASCII files?
>
> The feature that I really need is a specifiable comment character-
> i.e., "lines that start with ' should be excluded from comparison
> until a new line is reached". I'm recommenting and refactoring
> old code, and I need a way to see what's changed in type 1
> between versions A and B so that I can upgrade types 2 and 3
> from their current version to their next version.
>
> What a pain.
>
> Mike H.
On 12/18/06, Mike Hord <.....mike.hordKILLspam@spam@gmail.com> wrote:
> Does anyone know a good free file compare utility for ASCII files?
>
> The feature that I really need is a specifiable comment character-
> i.e., "lines that start with ' should be excluded from comparison
> until a new line is reached". I'm recommenting and refactoring
> old code, and I need a way to see what's changed in type 1
> between versions A and B so that I can upgrade types 2 and 3
> from their current version to their next version.
>
> What a pain.
I've been using "Beyond Compare" for source code comparisons.
> The feature that I really need is a specifiable comment character-
> i.e., "lines that start with ' should be excluded from comparison
> until a new line is reached".
Mike Hord <.....mike.hordKILLspam.....gmail.com> wrote:
> Does anyone know a good free file compare utility for ASCII files?
>
> The feature that I really need is a specifiable comment character-
> i.e., "lines that start with ' should be excluded from comparison
> until a new line is reached". I'm recommenting and refactoring
> old code, and I need a way to see what's changed in type 1
> between versions A and B so that I can upgrade types 2 and 3
> from their current version to their next version.
Well, it isn't Windows-specific, but "diff -I <pattern>" should
be pretty close to what you want. It's available in any Unix-ish
environment, including Cygwin on Windows.
Mike Hord wrote:
> Does anyone know a good free file compare utility for ASCII files?
>
> The feature that I really need is a specifiable comment character-
> i.e., "lines that start with ' should be excluded from comparison
> until a new line is reached". I'm recommenting and refactoring
> old code, and I need a way to see what's changed in type 1
> between versions A and B so that I can upgrade types 2 and 3
> from their current version to their next version.
>
> What a pain.
>
> Mike H.
>
> Of Tachyon
> Sent: Monday, December 18, 2006 9:55 AM
>
> Thought about installing Cygwin and using diff?
>
> Mike Hord wrote:
> > Does anyone know a good free file compare utility for ASCII files?
> >
> > The feature that I really need is a specifiable comment character-
> > i.e., "lines that start with ' should be excluded from comparison
> > until a new line is reached". I'm recommenting and refactoring
> > old code, and I need a way to see what's changed in type 1
> > between versions A and B so that I can upgrade types 2 and 3
> > from their current version to their next version.
> >
> > What a pain.
> >
> > Mike H.
> >
> On Mon, Dec 18, 2006 at 09:15:40AM -0600, Mike Hord wrote:
>
>> Does anyone know a good free file compare utility for ASCII files?
>>
>
> Diff. http://en.wikipedia.org/wiki/Diff
>
>
>> The feature that I really need is a specifiable comment character-
>> i.e., "lines that start with ' should be excluded from comparison
>> until a new line is reached".
>>
>
> Grep. http://en.wikipedia.org/wiki/Grep
>
> Both tools available in any reputable Linux distribution. On Windows, use
> cygwin. Also check out http://unxutils.sourceforge.net/
>
> Take care,
> -Chris
>
>
Mike Hord wrote:
> Does anyone know a good free file compare utility for ASCII files?
>
> The feature that I really need is a specifiable comment character-
> i.e., "lines that start with ' should be excluded from comparison
> until a new line is reached". I'm recommenting and refactoring
> old code,
So why do you want to exclude comments? They are a important part of code,
and changes in comments are just as important as changes in the executable
code.
If you just want to get everything into consistent formatting before the
compare, my COPYA program converts hard tabs (a bad idea anyway) to spaces
with arbitrary tab stops. My ALIGN_COMMENTS program lines up comments in a
particular column, and can understand various line end end of line comment
types. If this is MPASM code, my ASPIC_FIX program aligns everything,
including comments, into fixed columns and also removes hard spaces in a
single pass.
> So why do you want to exclude comments? They are a important part of code,
> and changes in comments are just as important as changes in the executable
> code.
If you saw this code, you'd know why. I'll rant for a moment, because
I (think I)
have a sympathetic audience.
1. No compiler/simulator: this code is in plaintext, which is uploaded through
a terminal program to the motion controller that it drives. No error reporting,
no syntax check, nothing. At best, a four digit error code with no line ref or
context. By ignoring the comments, it makes it easier for me to pick out the
actual code and spot errors.
2. Fully 15% of the code is commented code, removed by previous developers
from previous versions. I don't want to see that.
3. Frequently, when I'm going through the code adding a feature, I'll tidy up
the comments. Most of them are pointless (i.e., "increment Y by 6", "sets
Io 23 to 1", etc) or flat wrong, referring to functionality that's
gone or altered
so significantly it no longer resembles the described behavior. I don't want
to be told a line of code has changed just because I've deleted and re-written
the entire comment for that line, and added two or three lines of comments
to boot.
Maintaining this code is an absolute nightmare. We have three types of
code, for three different machine configuration scenarios, and all three types
have to be manually altered separately to add new features or fix new bugs.
I've gone through the most common one and cleaned it up, adding
comments and removing dead or commented code, but the fact is we're
at 8100 bytes of 8150 (yes, 8150. NOT 8192.), so we may be reaching
the end of the road for this thing.
On 12/18/06, Mike Hord <RemoveMEmike.hordTakeThisOuTgmail.com> wrote:
> Does anyone know a good free file compare utility for ASCII files?
>
> The feature that I really need is a specifiable comment character-
> i.e., "lines that start with ' should be excluded from comparison
> until a new line is reached". I'm recommenting and refactoring
> old code, and I need a way to see what's changed in type 1
> between versions A and B so that I can upgrade types 2 and 3
> from their current version to their next version.
>
> What a pain.
On 12/19/06, Xiaofan Chen <spamBeGonexiaofancspamBeGonegmail.com> wrote:
> On 12/18/06, Mike Hord <TakeThisOuTmike.hordEraseMEspam_OUTgmail.com> wrote:
> > Does anyone know a good free file compare utility for ASCII files?
> >
> > The feature that I really need is a specifiable comment character-
> > i.e., "lines that start with ' should be excluded from comparison
> > until a new line is reached". I'm recommenting and refactoring
> > old code, and I need a way to see what's changed in type 1
> > between versions A and B so that I can upgrade types 2 and 3
> > from their current version to their next version.
> >
> > What a pain.
>
> Winmerge (GPL, http://winmerge.org/ ) might be a good one.
Also, a good version control system is very helpful for this task. I
recommend Subversion with ViewVC (both Free). With ViewVC you can
browse the code in a web browser, with side-by-side, color-coded
diffs.
If you can describe the syntax of the file, you may be able to adapt a
tool like LXR: http://lxr.linux.no/
I find these web-based code broswers very convenient to use. When
writing notes about what you are doing, you can insert URLs to the
relevant code section. (I write my notes on an internal wiki, but
even MS-Word lets you insert hyperlinks.) Also, the code can be
accessed from any computer in the organization, which may or may not
be helpful to you.
Regards,
Mark
markrages@gmail
--
You think that it is a secret, but it never has been one.
- fortune cookie
Mike Hord wrote:
> Does anyone know a good free file compare utility
> for ASCII files?
> The feature that I really need is a specifiable
> comment character- i.e., "lines that start with ' should
> be excluded from comparison until a new line is reached".
You may export the files in MS Excel, then just loop through rows in
VBA to find differences between lines. Lines to delete you could color
in red; lines that differ, you could color in yellow.