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

Re: vi-script to generate a log-msg from a patch

From: <kfogel_at_collab.net>
Date: 2004-11-10 17:09:22 CET

"Ph. Marek" <philipp.marek@bmlv.gv.at> writes:
> Please see attached a newer version, which has the following comment from
> Julian applied:

Committed in r11819. I included Julian's correction to "extensions",
and called it diff-to-logmsg.vim, which is a compromise between the
name of the attachment and the name you gave it in its first line :-).

-Karl

>
> " diff-to-log-message.vim by Ph. Marek
> "
> " Usage is as follows:
> " diff -urp subversion.orig subversion.mine > patch
> " or
> " svn diff --diff-cmd=diff --extension="-up" [TARGET...] > patch
> "
> " (the -p tells diff to output the function names)
> " vi patch
> " :source diff_to_logmsg.vim
> " and voila! Just the documentation has to be written.
> "
> " Note from Julian Foad:
> " It ought to be noted that the generated list of funtion names
> " is only as accurate as the output of "diff -p", which is not very
> " accurate - e.g. for changes to a doc string appearing before a
> " function, it generally outputs the name of the _previous_ function.
>
>
> " goto start of patch and insert the header (until the .)
> :0
> insert
> [[[
>
>
> ]]]
>
>
> .
>
>
> " search for file and function names and put them before the ]]]
> :g/^\(---\|@@\)/normal ""yygg/]]]kk""p
>
>
> " change the copied lines to the wanted scheme
> :0
> :1;/]]]/ s#--- \([^\t ]\+\).\+#\r* \1#e
> :1;/]]]/ s#@@ .\+ @@.*\<\(\w\+\) *(.*# (\1): #e
> " all lines without function names are ignored
> :1;/]]]/ g#@@ .\+#normal dd
> " remove duplicates
> :1;/]]]/ !uniq

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Nov 10 19:05:10 2004

This is an archived mail posted to the Subversion Dev mailing list.