You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Mathias Weinert <ma...@gfa-net.de> on 2006/03/29 08:53:59 UTC

little [PATCH] for mailer.py

Hi there,

I am using mailer.py quite a while now and I find it more usefull if
the log message comes at the top of the mail, just after author, date
and revision number but not after all the changed paths.

Especially when many paths are changed with one commit I first want
to read the log message to see what the commit is about and then scroll
through the list of changed paths. Otherwise I have to scroll through
the whole list without knowing at all why these paths are changed.

BTW, I still hope that someone will commit my other patch to mailer.py
(Original post: http://svn.haxx.se/dev/archive-2006-02/0293.shtml,
several follow-ups exist).

Mathias

[[[
* tools/hook-scripts/mailer/mailer.py
  Show log message before changed paths (instead of after)
]]]

--- tools/hook-scripts/mailer/mailer.py.orig	2005-12-15 01:57:49.000000000 +0100
+++ tools/hook-scripts/mailer/mailer.py	2006-03-29 10:05:51.073150700 +0200
@@ -882,8 +882,8 @@
 
     w = self.output.write
 
-    w('Author: %s\nDate: %s\nNew Revision: %s\n\n'
-      % (data.author, data.date, data.rev))
+    w('Author: %s\nDate: %s\nNew Revision: %s\n\nLog: %s\n\n'
+      % (data.author, data.date, data.rev, data.log))
 
     # print summary sections
     self._render_list('Added', data.added_data)
@@ -900,8 +900,6 @@
       else:
         w('and changes in other areas\n')
 
-    w('\nLog:\n%s\n' % data.log)
-
     self._render_diffs(data.diffs)
     if data.other_diffs:
       w('\nDiffs of changes in other areas also in this revision:\n')

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] show log message before changed paths in mailer.py

Posted by "C. Michael Pilato" <cm...@collab.net>.
Julian Foad wrote:
> C. Michael Pilato wrote:
> 
>> Julian Foad wrote:
>>
>>>>> +    w('Author: %s\nDate: %s\nNew Revision: %s\n\nLog: %s\n\n'
>>>>> +      % (data.author, data.date, data.rev, data.log))
>>>
>>> [...]
>>>
>>>>> -    w('\nLog:\n%s\n' % data.log)
>>>
>>>
>>> ... it looks to me like it wrongly omits a newline after "Log:".
>>
>>
>> I'd call that a bugfix.  A multi-line log message really should begin
>> on its
>> own dedicated line.
> 
> 
> Er... what?  I'd call that the introduction of a bug, for the very same
> reason.  Note that the lines added are shown first, and the lines
> deleted are shown afterwards.

Ahem.  No, really, I *can* read diff format, I swear!

/me returns to his cave.

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Re: [PATCH] show log message before changed paths in mailer.py

Posted by Julian Foad <ju...@btopenworld.com>.
C. Michael Pilato wrote:
> Julian Foad wrote:
> 
>>>>+    w('Author: %s\nDate: %s\nNew Revision: %s\n\nLog: %s\n\n'
>>>>+      % (data.author, data.date, data.rev, data.log))
>>[...]
>>>>-    w('\nLog:\n%s\n' % data.log)
>>
>>... it looks to me like it wrongly omits a newline after "Log:".
> 
> I'd call that a bugfix.  A multi-line log message really should begin on its
> own dedicated line.

Er... what?  I'd call that the introduction of a bug, for the very same reason. 
  Note that the lines added are shown first, and the lines deleted are shown 
afterwards.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] show log message before changed paths in mailer.py

Posted by "C. Michael Pilato" <cm...@collab.net>.
Julian Foad wrote:
>>> +    w('Author: %s\nDate: %s\nNew Revision: %s\n\nLog: %s\n\n'
>>> +      % (data.author, data.date, data.rev, data.log))
> 
> [...]
> 
>>> -    w('\nLog:\n%s\n' % data.log)
> 
> 
> ... it looks to me like it wrongly omits a newline after "Log:".

I'd call that a bugfix.  A multi-line log message really should begin on its
own dedicated line.

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Re: [PATCH] show log message before changed paths in mailer.py

Posted by Julian Foad <ju...@btopenworld.com>.
Daniel Rall wrote:
> I like this change in output format, and see nothing wrong with the
> patch itself.

I haven't tried it but I'm happy with the idea, but ...

> On Wed, 29 Mar 2006, Mathias Weinert wrote:
>>+    w('Author: %s\nDate: %s\nNew Revision: %s\n\nLog: %s\n\n'
>>+      % (data.author, data.date, data.rev, data.log))
[...]
>>-    w('\nLog:\n%s\n' % data.log)

... it looks to me like it wrongly omits a newline after "Log:".

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] show log message before changed paths in mailer.py

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
On Wed, Mar 29, 2006 at 01:16:45PM -0800, Daniel Rall wrote:
> I like this change in output format, and see nothing wrong with the
> patch itself.

svnmailer (which is what apache.org uses) does the same thing (Log before
Modified).  The other thing svnmailer does is to emit a summary ViewVC link
before the Log.  Both were highly requested features.  -- justin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] show log message before changed paths in mailer.py

Posted by Daniel Rall <dl...@collab.net>.
I like this change in output format, and see nothing wrong with the
patch itself.

On Wed, 29 Mar 2006, Mathias Weinert wrote:

> Hi there,
> 
> I am using mailer.py quite a while now and I find it more usefull if
> the log message comes at the top of the mail, just after author, date
> and revision number but not after all the changed paths.
> 
> Especially when many paths are changed with one commit I first want
> to read the log message to see what the commit is about and then scroll
> through the list of changed paths. Otherwise I have to scroll through
> the whole list without knowing at all why these paths are changed.
... 
> [[[
> * tools/hook-scripts/mailer/mailer.py
>   Show log message before changed paths (instead of after)
> ]]]
> 
> --- tools/hook-scripts/mailer/mailer.py.orig	2005-12-15 01:57:49.000000000 +0100
> +++ tools/hook-scripts/mailer/mailer.py	2006-03-29 10:05:51.073150700 +0200
> @@ -882,8 +882,8 @@
>  
>      w = self.output.write
>  
> -    w('Author: %s\nDate: %s\nNew Revision: %s\n\n'
> -      % (data.author, data.date, data.rev))
> +    w('Author: %s\nDate: %s\nNew Revision: %s\n\nLog: %s\n\n'
> +      % (data.author, data.date, data.rev, data.log))
>  
>      # print summary sections
>      self._render_list('Added', data.added_data)
> @@ -900,8 +900,6 @@
>        else:
>          w('and changes in other areas\n')
>  
> -    w('\nLog:\n%s\n' % data.log)
> -
>      self._render_diffs(data.diffs)
>      if data.other_diffs:
>        w('\nDiffs of changes in other areas also in this revision:\n')