[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Problem with format of svn diff output

From: Mark Phippard <markp_at_softlanding.com>
Date: 2006-05-24 15:05:01 CEST

breser@gmail.com wrote on 05/24/2006 01:38:38 AM:

> On 5/23/06, Mark Phippard <markp@softlanding.com> wrote:
> > So my questions...yes there are some.
> >
> > Is it completely wrong of Eclipse to be expecting a date/time on the
line?
>
> I would say no. However, to my knowledge it will make it the only
> piece of software that's doing so.
>
> > How strict is the unified diff format?
>
> Well the big question is who defines the unified diff format? GNU
> didn't come up with the format but they did adopt it and are the
> reason for the current popularity.
>
>
http://www.gnu.org/software/diffutils/manual/html_node/Detailed-Unified.html
>
> There's no real official standard and GNU hasn't really described it
> to any degree of formality. I know there was some effort a long time
> ago to sit down and try to come up with some agreement on some of
> these sorts of issues and maybe even hash out a new format that
> actually answered things like add, change, delete, etc...

Thanks for the background and pointers.

> > Is there a more commonly used algorithm to quickly figure out if a
file in
> patch is an
> > Add/Change or Delete?
>
> I don't even see how the date really proves anything. It depends on
> everyone having their clocks in sync (which is true in theory but not
> always in practice) or only a single person generating and applying
> the patch on a single machine.

It might be specific to the patches that they produce from Eclipse, but
the reason it works is that if you do an Add, then the old revision has a
date of 0 (1/1/1970). And if you are doing a Delete, the new revision has
a date of 0. So they are looking for the zero dates, and if neither of
them are zero they consider it a modfication.

Mark

_____________________________________________________________________________
Scanned for SoftLanding Systems, Inc. and SoftLanding Europe Plc by IBM Email Security Management Services powered by MessageLabs.
_____________________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed May 24 15:05:36 2006

This is an archived mail posted to the Subversion Dev mailing list.