[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: Ben Reser <ben_at_reser.org>
Date: 2006-05-24 07:38:38 CEST

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...

I remember seeing details on it but I don't remember where maybe
someone can dig up the URL for it.

> 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.

Using the date to guess the operation the unified diff is representing
is nothing more than a hack. It may work in the majority of cases but
there's lots of nasty edge cases floating around there.

What Eclipse ought to do is check to see if there's a valid date there
and if not ignore it and just process it like patch would. If there's
a valid date they can use their spiffy feature.

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

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.