Daniel Shahaf wrote on Sat, Mar 23, 2013 at 16:40:30 +0200:
> Nothing to see here; I'm just correcting the commands I used:
>
> spatch -inplace -sp_file 1 subversion/libsvn_subr/*.c
> vim
> :match Error /.\{81\}.*/
> :set aw et so=99 ai si ci sw=2 ts=2 cin cino=>2,n2,f0,{2,}0,=2,t0,+4,C1,(0,u0,*300
> :map <F3> :cn<CR>
> :map <F4> gw%
> :map <F5> f,f<Space>r<CR>gw%
> :vimgrep /svn_hash_sets.*\%81c/ subversion/libsvn_subr/*.c
> :vimgrep /svn_hash_gets.*\%81c/ subversion/libsvn_subr/*.c
> :"### (those cinoptions don't format blocks correctly, but they suffice for
> :"### the one-line task at hand here)
> ...
> :wq
And the command to add those pesky missing "svn_hash.h" includes
(apparently, some files used apr_hash_get without including apr_hash.h
directly):
vim $(make -ksj4 libsvn_repos 2>&1 | grep Error | perl -lpe 's/.*\[//; s/\..*/.c/') -c 'argdo /#include "svn_/' -c 'set aw' -c 'silent argdo norm! O#include "svn_hash.h"' -c wqa
> svn commit
>
> where...
>
>
> [[[
> % cat 1.cocci
> @@
> expression ht, key;
> @@
>
> -apr_hash_get(ht, key, APR_HASH_KEY_STRING)
> +svn_hash_gets(ht, key)
>
> @@
> expression ht, key, val;
> @@
>
> -apr_hash_set(ht, key, APR_HASH_KEY_STRING, val)
> +svn_hash_sets(ht, key, val)
>
> ]]]
>
Received on 2013-03-23 16:12:41 CET