This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: diff issue


Greetings, Brian Wilson!

>> I have strange (to me) issue that I'm not entirely sure how to interpret.
>> 
>> Let's say I have two versions of the same batch file:
>> 
>> The old version from CVS:
>> 
>> > rem $Id: backup.bat,v 1.1 2007/07/17 01:53:30 Daemon Exp $
>> > rar a -ag-YYYY-MM-DD_HH-MM -- MinerTimer @MinerTimer.list
>> 
>> The new version I've imported to Subversion:
>> 
>> > @echo off
>> > rem $Id: backup.bat 10 2010-09-30 01:22:14Z anrdaemon $
>> > rar a -ag-YYYY-MM-DD_HH-MM -- MinerTimer @MinerTimer.list
>> 
>> When I'm comparing them with my usual macro
>> diff -bdu -x "CVS" -x ".svn" -I "\$Id.*\$" -I "\$Revision.*\$" -I 
>> "\$Date.*\$" -I "\$Author.*\$" --strip-trailing-cr -- '1/backup.bat' 
>> 'backup.bat'
>> 
>> It telling me that $Id$ lines are differ.
>> But when I remove the "@echo off" from second file, it telling me 
>> that files are "identical" (the expected result).
>> 
>> Having hard times dechiphering man diff, so if anyone can enlighten 
>> me in simple words on the matter, I'd appreciate help greatly.

> Be sure the end of line characters are correct on the "@echo" line.  You 
> should be able to do this with a "cat -vTE" command.

They are "correct" for windows batch fine (CRLF) and consistent for both
files.
However, changing line endings didn't changed the end result. I'm leaning
towards diff specifics in treatment of ignored lines in scope of actually
changed lines.

> (sorry for my terrible Russian)

:) If my English was the same as your Russian, accept my deepest apology.


--
WBR,
 Andrey Repin (anrdaemon@freemail.ru) 01.10.2010, <4:17>

Sorry for my terrible english...


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]