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

mailer.py bugs

From: <Servatius.Brandt_at_fujitsu-siemens.com>
Date: 2005-06-21 15:31:08 CEST

There are some problems with mailer.py from the tools/hook-scritps
directory of the 1.2.0 Subversion source release.

The documentation in the mailer.conf.example file talks about
"truncate_subject" (with underline), the mailer.py script uses
"truncate-subject" (with dash). Since all other options are with
underline, I suppose the mailer.py script should be fixed.

When I run mailer.py, I get the following error:

Traceback (most recent call last):
  File "./mailer.py", line 1196, in ?
    sys.argv[3:3+expected_args])
  File "/usr/lib/python2.4/site-packages/svn/core.py", line 40, in
run_app
    return apply(func, (pool,) + args, kw)
  File "./mailer.py", line 74, in main
    messenger.generate()
  File "./mailer.py", line 358, in generate
    group, params, paths, subpool)
  File "./mailer.py", line 604, in generate_content
    renderer.render(data)
  File "./mailer.py", line 828, in render
    if data.show_nonmatching_paths:
AttributeError: _data instance has no attribute 'show_nonmatching_paths

When I fix the problem by adding

    show_nonmatching_paths=show_nonmatching_paths,

in the assignment to "data" at the end of generate_content(), I get
another error:

Diffs of changes in other areas also in this revision:
Traceback (most recent call last):
  File "./mailer.py", line 1197, in ?
    sys.argv[3:3+expected_args])
  File "/usr/lib/python2.4/site-packages/svn/core.py", line 40, in
run_app
    return apply(func, (pool,) + args, kw)
  File "./mailer.py", line 74, in main
    messenger.generate()
  File "./mailer.py", line 358, in generate
    group, params, paths, subpool)
  File "./mailer.py", line 605, in generate_content
    renderer.render(data)
  File "./mailer.py", line 842, in render
    self._render_diffs(data.other_diffs)
  File "./mailer.py", line 877, in _render_diffs
    if diff.kind == 'D':
AttributeError: DiffGenerator instance has no attribute 'kind'

When I change _render_diffs() to use diff["kind"] instead of diff.kind
and after fixing the same errors for "path" and "binary", I get this:

Traceback (most recent call last):
  File "./mailer.py", line 1197, in ?
    sys.argv[3:3+expected_args])
  File "/usr/lib/python2.4/site-packages/svn/core.py", line 40, in
run_app
    return apply(func, (pool,) + args, kw)
  File "./mailer.py", line 74, in main
    messenger.generate()
  File "./mailer.py", line 358, in generate
    group, params, paths, subpool)
  File "./mailer.py", line 605, in generate_content
    renderer.render(data)
  File "./mailer.py", line 842, in render
    self._render_diffs(data.other_diffs)
  File "./mailer.py", line 890, in _render_diffs
    if diff["binary"]:
  File "./mailer.py", line 658, in __getitem__
    raise IndexError
IndexError

Is there a working version of mailer.py?

------------------------------------------------------------------------
Servatius Brandt Phone: +49 89 636-41504
Fujitsu Siemens Computers Fax: +49 89 636-48716
EP SW AD C++ Email: Servatius.Brandt@fujitsu-siemens.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Jun 21 15:34:19 2005

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.