delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD |
X-Spam-Check-By: | sourceware.org |
From: | "Brian Wilson" <wilson AT ds DOT net> |
To: | Andrey Repin <cygwin AT cygwin DOT com> |
Subject: | Re: diff issue |
Date: | Thu, 30 Sep 2010 22:20:24 -0400 |
Message-Id: | <20101001015713.M64956@ds.net> |
In-Reply-To: | <191883817.20101001042301@mtu-net.ru> |
References: | <1842787202 DOT 20100930054004 AT mtu-net DOT ru> <20100930151033 DOT M76347 AT ds DOT net> <191883817 DOT 20101001042301 AT mtu-net DOT ru> |
X-OriginatingIP: | 65.12.174.114 (wilson) |
MIME-Version: | 1.0 |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
>>> 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. > > :) If my English was the same as your Russian, accept my deepest apology. Your English is fine. I used Google translate to try and make my response easier for you. I guess that didn't happen, so the fault is mine. Try changing the "@echo" line to something else and see if you still get the same results. Also try removing some of the -I cases and see if that makes a difference in the results. This could lead you to the answer if one of the patterns is causing the problem. Lastly do you need to use the "-x PATtern" exclusion options? You are already specifying the two files to diff so you shouldn't need these options. I'm not sure what the "--" argument is used for (before the file names) though. I would also try naming the directory in the "1/backup.bat" argument something other than "1". -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |