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

Re: svn commit: r1382864 - /subversion/trunk/tools/server-side/svnpubsub/svnwcsub.py

From: Greg Stein <gstein_at_gmail.com>
Date: Mon, 10 Sep 2012 10:59:18 -0400

On Sep 10, 2012 10:19 AM, <danielsh_at_apache.org> wrote:
>
> Author: danielsh
> Date: Mon Sep 10 14:18:51 2012
> New Revision: 1382864
>
> URL: http://svn.apache.org/viewvc?rev=1382864&view=rev
> Log:
> [in tools/server-side/svnpubsub]
>
> Fix a bogus logging.critical().
>
> Found by: joes
>
> * svnwcsub.py
> (BackgroundWorker.run): Fix if/else chain.
>
> Modified:
> subversion/trunk/tools/server-side/svnpubsub/svnwcsub.py
>
> Modified: subversion/trunk/tools/server-side/svnpubsub/svnwcsub.py
> URL:
http://svn.apache.org/viewvc/subversion/trunk/tools/server-side/svnpubsub/svnwcsub.py?rev=1382864&r1=1382863&r2=1382864&view=diff
>
==============================================================================
> --- subversion/trunk/tools/server-side/svnpubsub/svnwcsub.py (original)
> +++ subversion/trunk/tools/server-side/svnpubsub/svnwcsub.py Mon Sep 10
14:18:51 2012
> @@ -228,9 +228,11 @@ class BackgroundWorker(threading.Thread)
> # This will block until something arrives
> operation, wc = self.q.get()
> try:
> - if operation == OP_UPDATE:
> + if False:
> + pass

Please don't do this. Use the original pattern: if/elif/elif.

> + elif operation == OP_UPDATE:
> self._update(wc)
> - if operation == OP_BOOT:
> + elif operation == OP_BOOT:
> self._update(wc, boot=True)
> elif operation == OP_CLEANUP:
> self._cleanup(wc)
>
>
Received on 2012-09-10 16:59:52 CEST

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

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