You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Branko Čibej <br...@xbc.nu> on 2007/12/30 03:18:51 UTC

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

jerenkrantz@tigris.org wrote:
> Author: jerenkrantz
> Date: Sat Dec 29 10:58:18 2007
> New Revision: 28702
>
> Log:
> Diff: Make -p ignore 'public'/'private'/'protected' C++/Java reserved words.
>   
[...]
> +      c = apr_array_push(baton.extra_skip_match);
> +      *c = "public:*";
> +      c = apr_array_push(baton.extra_skip_match);
> +      *c = "private:*";
> +      c = apr_array_push(baton.extra_skip_match);
> +      *c = "protected:*";
>   
This will (mostly*) work for C++ where these keywords have label-like
syntax, but not for Java, where they are modifiers. That said, I've
never seen Java code where one of these keywords would appear in the
first column of a line.

-- Brane

* There can be whitespace between the keyword and the colon in C++.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

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

Posted by Branko Čibej <br...@xbc.nu>.
Branko Čibej wrote:
> jerenkrantz@tigris.org wrote:
>   
>> Author: jerenkrantz
>> Date: Sat Dec 29 10:58:18 2007
>> New Revision: 28702
>>
>> Log:
>> Diff: Make -p ignore 'public'/'private'/'protected' C++/Java reserved words.
>>   
>>     
> [...]
>   
>> +      c = apr_array_push(baton.extra_skip_match);
>> +      *c = "public:*";
>> +      c = apr_array_push(baton.extra_skip_match);
>> +      *c = "private:*";
>> +      c = apr_array_push(baton.extra_skip_match);
>> +      *c = "protected:*";
>>   
>>     
> This will (mostly*) work for C++ where these keywords have label-like
> syntax, but not for Java, where they are modifiers. That said, I've
> never seen Java code where one of these keywords would appear in the
> first column of a line.
>   

Of course I tell a lie. These modifiers can appear on Java class
definitions, along with "abstract" and "final", IIRC. Luckily these glob
patterns won't match such definitions.


> -- Brane
>
> * There can be whitespace between the keyword and the colon in C++.
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org