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

Re: svn commit: r40403 - trunk/subversion/libsvn_diff

From: Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA_at_GMail.Com>
Date: Fri, 6 Nov 2009 18:46:14 +0100

2009-11-06 18:35:01 Daniel Rall napisał(a):
> On Fri, Nov 6, 2009 at 9:31 AM, Arfrever Frehtes Taifersar Arahesis
> <Arfrever.FTA_at_gmail.com> wrote:
> > 2009-11-06 16:37:10 Stefan Sperling napisał(a):
> ...
> >> @@ -248,6 +252,11 @@ parse_next_hunk(svn_hunk_t **hunk,
> >> last_line = pos;
> >> SVN_ERR(svn_stream_readline(stream, &line, patch->eol_str, &eof,
> >> iterpool));
> >> +
> >> + /* Skip lines which aren't part of the hunk text. */
> >> + if (strcmp(line->data, "\\ No newline at end of file") == 0)
> >> + continue;
> >
> > Such comparisons won't help for non-English users:
> >
> > $ echo -e "x\ny" > file1
> > $ echo -en "x\ny" > file2
> > $ diff -u file1 file2
> > --- file1 2009-11-06 18:19:48.000000000 +0100
> > +++ file2 2009-11-06 18:19:54.000000000 +0100
> > @@ -1,2 +1,2 @@
> > x
> > -y
> > +y
> > \ Brak znaku nowej linii na końcu pliku
> > $
>
> Not commenting on the approach, but you could wrap that English string
> in _() to localize it before the strcmp (maybe still also falling back
> to the English translation).

In this case, translation is performed using data obtained from .mo files
from GNU Diffutils project. This string can be different in different
diff implementations and in different versions of the same implementation.

-- 
Arfrever Frehtes Taifersar Arahesis
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2415164
Received on 2009-11-06 18:43:58 CET

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