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

Re: [RFC] Rename 'svn_error_return' to 'svn_error_trace'?

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Thu, 23 Jun 2011 16:10:54 +0300

C. Michael Pilato wrote on Thu, Jun 23, 2011 at 08:57:28 -0400:
> Omigosh. +1. I, too, know we're well into bikeshed territory here, but if
> we're going to paint our sheds anyway, why use only a clear-coat stain
> ("return svn_error_return(...)")? Use a color that says something!
>
> "svn_error_trace" is a fine choice of a name. Just a pity that it's a
> character shorter than the existing name, though, as far as the
> global-search-and-replace goes. Mmm... indentation... :-(

This /can/ be automated.

In Vim, I might do:

:set autowrite
:set cindent cinoptions=>1s,e0,n0,f0,{.5s,}0,^-.5s,=.5s,t0,+1s,c3,(0,u0,:0
:grep -Rw svn_error_return subversion
qancesvn_error_trace^[gw%:cn
q_at_a@@66@@

(where ^[ is a real ctrl-[)

and it would work for 95% of the instances. I used this approach in the
past (for one of my "Fix something across the whole C codebase" commits)
and it worked nicely.

Another value for the macro would be:
qancesvn_error_trace^[lv%oj:s/^.//
q
Received on 2011-06-23 15:11:54 CEST

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.