On Sat, Dec 6, 2008 at 5:04 AM, Ryan Schmidt
> On Dec 5, 2008, at 13:57, Steven Woody wrote:
>> On Sat, Dec 6, 2008 at 3:43 AM, Ryan Schmidt wrote:
>>> On Dec 5, 2008, at 13:40, Steven Woody wrote:
>>>> On Sat, Dec 6, 2008 at 3:06 AM, Ryan Schmidt wrote:
>>>>> On Dec 5, 2008, at 12:58, Steven Woody wrote:
>>>>>> 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
>>>>> 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.
>>> That line in the config file is in the auto-props section. It means the
>>> properties will be automatically added to new files when they're added to
>>> the repository. Now that your file is in the repository, changing that
>>> in the config file has no effect for it. If you want to test this, you
>>> have to actually remove the svn:eol-style property from the file in
>> Than you. I tested and the result is that the svn:eol-style property
>> has nothing to do with the problem, it is the "svn:keywords" property
>> and set on this file caused the strange behavior. After I removed the
>> "svn:keywords" property, 'svn diff' will give me expected result. But
>> I need my source files have a "svn:keywords" property, so I can add
>> $Id$ in each of these file. I still don't understand why the
>> "svn:keywords" property conflict with "svn diff' behavior. Do you
>> experts get a solution? Thanks in advance.
> Oh, yes, I'm sorry, it was svn:keywords, and it makes sense too; here's why:
> Subversion stores files in the repository with their keywords unexpanded.
> When you check out a working copy, it copies those files with unexpanded
> keywords into the text-base directory in the .svn directory in your working
> copy. (These are the "pristine" files.) Then it copies those files into the
> working copy and expands the keywords.
> When you want to look at a diff, you don't want to see a line for each
> keyword that got expanded, so Subversion creates a temporary copy of your
> working file and unexpands the keywords in it so that it can show a clean
> diff against the pristine copy.
Ok, thank you. It now sounds reasonable. I am thinking that is there
another vim user get similar requirement like me, I still want to
directly edit my working copy ... :)
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2008-12-08 09:58:31 CET