[Python-Dev] generated NEWS files
"Martin v. Löwis"
martin at v.loewis.de
Sat Apr 12 19:34:58 CEST 2008
>> /data/repos/projects/hooks/mailer.py propchange "$@"
>> The script is the same mailer.py that is also invoked in post-commit.
>> Can anybody see a problem with that?
> No, but how many parameters are passed to mailer.py?
> if cmd == 'commit':
> if len(sys.argv) > 5:
> if len(sys.argv) > 4:
> config_fname = sys.argv
> elif cmd == 'propchange':
> if len(sys.argv) < 6 or len(sys.argv) > 7:
> # ...
> For commit, sys.argv must be <= 5, but for propchange sys.argv must ==
> 6, unless my tired eyes are reading that wrong. I don't know if the #
> of args passed are the same in both cases or not.
I've now looked into this; in Subversion 1.2, the number of arguments
passed to post-revprop-change had changed, giving an addition "action"
as $5. This broke the old mailer.py, which expected only 4 arguments.
The rationale for this additional argument was to be able to tell
whether a property had been added, modified, or deleted; if it was
added, the old value was supplied as stdin (since revprops themselves
I've now updated mailer.py, merging our (few) changes into it.
If anything seems broken now, please let me know.
More information about the Python-Dev