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

Re: Edit working copy while see the 'diff'

From: Steven Woody <narkewoody_at_gmail.com>
Date: Sat, 6 Dec 2008 03:40:20 +0800

On Sat, Dec 6, 2008 at 3:06 AM, Ryan Schmidt
<subversion-2008c_at_ryandesign.com> wrote:
> On Dec 5, 2008, at 12:58, Steven Woody wrote:
>
>> On Sat, Dec 6, 2008 at 1:42 AM, Steven Woody <narkewoody_at_gmail.com> wrote:
>>>
>>> On Fri, Dec 5, 2008 at 10:24 PM, David Weintraub <qazwart_at_gmail.com>
>>> wrote:
>>>>
>>>> I also use vimdiff as my diff program when I do a "svn diff" on files,
>>>> and I
>>>> don't seem to have this issue. I can easily edit my current file (which
>>>> appears on the right hand side).
>>>> Here's my "diff" command:
>>>> #! /usr/bin/env perl
>>>> use strict;
>>>> use warnings;
>>>> my $DIFF = "/usr/local/bin/vimdiff";
>>>> my $parameters = $#ARGV;
>>>> my $file1 = $ARGV[$parameters - 1];
>>>> my $file2 = $ARGV[$parameters];
>>>> my $title1 = $ARGV[$parameters - 4];
>>>> my $title2 = $ARGV[$parameters - 2];
>>>> my $title = "$title1 - $title2";
>>>> $title =~ s/\t/ /g;
>>>> $title =~ s/ /\\ /g;
>>>> my $command = qq($DIFF -c "set titlestring=$title" "$file1" "$file2");
>>>> system qq($command);
>>>> The file on the left is a temporary file. The file on the right is the
>>>> actual file being compared.
>>>
>>> my problem is that some times svn will call the external diff command
>>> with $ARGV[$parameters - 1] or $7 in bash with something like
>>> /tmp/svndiff.c, and I don't understand why he can not rather use the
>>> real working copy.
>>
>> Hi, let me make it clear: sometimes 'svn diff' command will generate
>> a file /tmp/svndiff.tmp as the right hand side file, and passwd the
>> name of the file to used defined external diff command such as
>> vimdiff. Could anyone tell me why this happend and how to avoid it.
>
> I believe I remember someone saying this happens only when you have used the
> svn:eol-style property on the file, but I have not tested this.
>

Yes, the file is a .c source file and I used the "*.c =
svn:eol-style=native" line in my .subversion/config. but even after I
commented the config line, the /tmp/svndiff.tmp is still be generated.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=980293

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2008-12-08 09:06:10 CET

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

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