1 " diff-to-logmsg.vim by Ph. Marek <philipp.marek@bmlv.gv.at>
5 " diff -urp subversion.orig subversion.mine > patch
7 " svn diff --diff-cmd=diff --extensions="-up" [TARGET...] > patch
9 " (the -p tells diff to output the function names), then
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 .)
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