[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: Daniel Rall <dlr_at_finemaltcoding.com>
Date: Fri, 6 Nov 2009 09:35:01 -0800

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

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2415161
Received on 2009-11-06 18:35:30 CET

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.