Fix compiler warning due to missing function prototype.
[svn.git] / contrib / client-side / vim / diff-to-logmsg.vim
blob2e303b5a0011167f012b480dbfb83b316ded1f02
1 " diff-to-logmsg.vim by Ph. Marek <philipp.marek@bmlv.gv.at>
2
3 " Usage is as follows:
5 "   diff -urp subversion.orig subversion.mine > patch
6 " or 
7 "   svn diff --diff-cmd=diff --extensions="-up" [TARGET...] > patch
9 " (the -p tells diff to output the function names), then
11 "   vi patch
12 "   :source diff_to_logmsg.vim
14 " and voila!  Just the documentation has to be written.
16 " Note from Julian Foad:
17 "   It ought to be noted that the generated list of function names
18 "   is only as accurate as the output of "diff -p", which is not very
19 "   accurate - e.g. for changes to a doc string appearing before a 
20 "   function, it generally outputs the name of the _previous_ function.
23 " goto start of patch and insert the header (until the .)
25 insert
26 [[[
29 ]]]
35 " search for file and function names and put them before the ]]]
36 :g/^\(---\|@@\)/normal ""yygg/]]]\ekk""p
39 " change the copied lines to the wanted scheme
41 :1;/]]]/ s#--- \([^\t ]\+\).\+#\r* \1#e
42 :1;/]]]/ s#@@ .\+ @@.*\<\(\w\+\) *(.*#  (\1): #e
43 " all lines without function names are ignored
44 :1;/]]]/ g#@@ .\+#normal dd
45 " remove duplicates
46 :1;/]]]/ !uniq