You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Daniel Shahaf <da...@apache.org> on 2013/05/26 23:22:48 UTC
Re: svn commit: r1486463 - in /subversion/trunk/tools/server-side/svnpubsub: revprop-change-hook.py svnpubsub/client.py svnpubsub/server.py watcher.py
On Sun, May 26, 2013 at 08:06:47PM -0000, brane@apache.org wrote:
> +def main(repo, revision, author, propname, action):
> + else:
> + sys.stderr.write('Unknown revprop change action "%s"\n' % action)
> + return
Maybe sys.exit(1)? Otherwise the stderr output will likely go unnoticed
(libsvn_repos discards stderr when the exit code is zero).
> +if __name__ == "__main__":
> + if len(sys.argv) != 6:
> + sys.stderr.write("invalid args\n")
> + sys.exit(0)
> +
Same.
Re: svn commit: r1486463 - in /subversion/trunk/tools/server-side/svnpubsub:
revprop-change-hook.py svnpubsub/client.py svnpubsub/server.py watcher.py
Posted by Branko Čibej <br...@wandisco.com>.
On 26.05.2013 23:22, Daniel Shahaf wrote:
> On Sun, May 26, 2013 at 08:06:47PM -0000, brane@apache.org wrote:
>> +def main(repo, revision, author, propname, action):
>> + else:
>> + sys.stderr.write('Unknown revprop change action "%s"\n' % action)
>> + return
> Maybe sys.exit(1)? Otherwise the stderr output will likely go unnoticed
> (libsvn_repos discards stderr when the exit code is zero).
>
>> +if __name__ == "__main__":
>> + if len(sys.argv) != 6:
>> + sys.stderr.write("invalid args\n")
>> + sys.exit(0)
>> +
> Same.
I was wondering about that myself. I basically just copied the behaviour
of the commit-hook.
-- Brane
--
Branko Čibej
Director of Subversion | WANdisco | www.wandisco.com
Re: svn commit: r1486463 - in /subversion/trunk/tools/server-side/svnpubsub:
revprop-change-hook.py svnpubsub/client.py svnpubsub/server.py watcher.py
Posted by Branko Čibej <br...@wandisco.com>.
On 27.05.2013 10:22, Branko Čibej wrote:
> On 27.05.2013 06:41, Daniel Shahaf wrote:
>> On Sun, May 26, 2013 at 09:22:48PM +0000, Daniel Shahaf wrote:
>>> On Sun, May 26, 2013 at 08:06:47PM -0000, brane@apache.org wrote:
>>>> +def main(repo, revision, author, propname, action):
>>>> + else:
>>>> + sys.stderr.write('Unknown revprop change action "%s"\n' % action)
>>>> + return
>>> Maybe sys.exit(1)? Otherwise the stderr output will likely go unnoticed
>>> (libsvn_repos discards stderr when the exit code is zero).
>> You haven't s/return/sys.exit(1)/ here. Do you disagree with that change?
> Ah, I just missed it. It was kind of late.
r1486597
-- Brane
--
Branko Čibej
Director of Subversion | WANdisco | www.wandisco.com
Re: svn commit: r1486463 - in /subversion/trunk/tools/server-side/svnpubsub:
revprop-change-hook.py svnpubsub/client.py svnpubsub/server.py watcher.py
Posted by Branko Čibej <br...@wandisco.com>.
On 27.05.2013 06:41, Daniel Shahaf wrote:
> On Sun, May 26, 2013 at 09:22:48PM +0000, Daniel Shahaf wrote:
>> On Sun, May 26, 2013 at 08:06:47PM -0000, brane@apache.org wrote:
>>> +def main(repo, revision, author, propname, action):
>>> + else:
>>> + sys.stderr.write('Unknown revprop change action "%s"\n' % action)
>>> + return
>> Maybe sys.exit(1)? Otherwise the stderr output will likely go unnoticed
>> (libsvn_repos discards stderr when the exit code is zero).
> You haven't s/return/sys.exit(1)/ here. Do you disagree with that change?
Ah, I just missed it. It was kind of late.
-- Brane
--
Branko Čibej
Director of Subversion | WANdisco | www.wandisco.com
Re: svn commit: r1486463 - in /subversion/trunk/tools/server-side/svnpubsub: revprop-change-hook.py svnpubsub/client.py svnpubsub/server.py watcher.py
Posted by Daniel Shahaf <da...@apache.org>.
On Sun, May 26, 2013 at 09:22:48PM +0000, Daniel Shahaf wrote:
> On Sun, May 26, 2013 at 08:06:47PM -0000, brane@apache.org wrote:
> > +def main(repo, revision, author, propname, action):
> > + else:
> > + sys.stderr.write('Unknown revprop change action "%s"\n' % action)
> > + return
>
> Maybe sys.exit(1)? Otherwise the stderr output will likely go unnoticed
> (libsvn_repos discards stderr when the exit code is zero).
You haven't s/return/sys.exit(1)/ here. Do you disagree with that change?
Re: svn commit: r1486463 - in /subversion/trunk/tools/server-side/svnpubsub: revprop-change-hook.py svnpubsub/client.py svnpubsub/server.py watcher.py
Posted by Daniel Shahaf <da...@apache.org>.
On Sun, May 26, 2013 at 09:22:48PM +0000, Daniel Shahaf wrote:
> On Sun, May 26, 2013 at 08:06:47PM -0000, brane@apache.org wrote:
> > +def main(repo, revision, author, propname, action):
> > + else:
> > + sys.stderr.write('Unknown revprop change action "%s"\n' % action)
> > + return
>
> Maybe sys.exit(1)? Otherwise the stderr output will likely go unnoticed
> (libsvn_repos discards stderr when the exit code is zero).
You haven't s/return/sys.exit(1)/ here. Do you disagree with that change?