You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Chatterbox <bf...@telenet.be> on 2006/10/11 11:05:50 UTC

mailer.py, post-commit and SubVersion 1.4 on Windows

Hi all,

I just downloaded the stable binary distribution of SubVersion 1.4 for
Windows, the stable Python bindings, and the official mailer.py script.

However, when I try to use the post-commit command, I get the follow
error:

mailer.py commit "F:/Nazooka/Development/svn/nazooka" 4
Traceback (most recent call last):
  File "F:\Nazooka\Development\SVN\Nazooka\hooks\mailer.py", line 1832,
in ?
    sys.argv[3:3+expected_args])
  File "C:\Python24\Lib\site-packages\svn\core.py", line 217, in
run_app
    return apply(func, (_core.application_pool,) + args, kw)
  File "F:\Nazooka\Development\SVN\Nazooka\hooks\mailer.py", line 77,
in main
    messenger.generate()
  File "F:\Nazooka\Development\SVN\Nazooka\hooks\mailer.py", line 392,
in generate
    group, params, paths, subpool)
  File "F:\Nazooka\Development\SVN\Nazooka\hooks\mailer.py", line 733,
in generate_content
    added_data=generate_list('A', changelist, paths, True),
  File "F:\Nazooka\Development\SVN\Nazooka\hooks\mailer.py", line 765,
in generate_list
    if selection(change) and paths.has_key(path) == in_paths:
  File "F:\Nazooka\Development\SVN\Nazooka\hooks\mailer.py", line 755,
in <lambda>
    selection = lambda change: change.action ==
svn.repos.CHANGE_ACTION_ADD
AttributeError: ChangedPath instance has no attribute 'action'

I checked the ChangedPath class in the python bindings, and indeed, it
does not have an 'action' attribute.

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

Re: mailer.py, post-commit and SubVersion 1.4 on Windows

Posted by "C. Michael Pilato" <cm...@collab.net>.
Malcolm Rowe wrote:
> It looks like r21467 changed mailer.py to depend upon ChangedPath.action,
> which was only introduced in r21655, so mailer.py now depends upon
> the trunk bindings.  So far, so boring, except that mailer.py has the
> following text at the top:
> 
> #   This version of mailer.py requires the python bindings from
> #   subversion 1.2.0 or later.
> 
> ... which I take to be as much a statement of intent as a piece of user
> documentation.
> 
> What's the correct change here?
>   a. Fix mailer.py to work against the 1.2 bindings, or,
>   b. Just update the mailer.py comment to say that it depends upon
>      the 1.5 bindings.

    c. Remove the comment altogether, and replaced with some code
       that does minimal version checking.

We don't seriously mean to imply that you can use a mailer.py that's
newer (at the granularity of any given public release) than the
libraries behind it.  We provide mailer.py alongside our code in our
source releases, and we should encourage package maintainers to do the same.

So to me, options (b) or (c) are the only reasonable ones.

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


Re: mailer.py, post-commit and SubVersion 1.4 on Windows

Posted by Malcolm Rowe <ma...@farside.org.uk>.
On Wed, Oct 11, 2006 at 04:05:50AM -0700, Chatterbox wrote:
> I just downloaded the stable binary distribution of SubVersion 1.4 for
> Windows, the stable Python bindings, and the official mailer.py script.
> 
> However, when I try to use the post-commit command, I get the follow
> error:
> 
> [snip]
>   File "F:\Nazooka\Development\SVN\Nazooka\hooks\mailer.py", line 755,
> in <lambda>
>     selection = lambda change: change.action ==
> svn.repos.CHANGE_ACTION_ADD
> AttributeError: ChangedPath instance has no attribute 'action'
> 
> I checked the ChangedPath class in the python bindings, and indeed, it
> does not have an 'action' attribute.
> 

Ok, so it looks like you're using the trunk version of mailer.py against
the 1.4 bindings.  That would normally be fine, except that we seem to
have broken compatibility recently on trunk -- if you use the version of
mailer.py that was distributed in the 1.4 tarball you should be fine.


It looks like r21467 changed mailer.py to depend upon ChangedPath.action,
which was only introduced in r21655, so mailer.py now depends upon
the trunk bindings.  So far, so boring, except that mailer.py has the
following text at the top:

#   This version of mailer.py requires the python bindings from
#   subversion 1.2.0 or later.

... which I take to be as much a statement of intent as a piece of user
documentation.

What's the correct change here?
  a. Fix mailer.py to work against the 1.2 bindings, or,
  b. Just update the mailer.py comment to say that it depends upon
     the 1.5 bindings.

Regards,
Malcolm