You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/12/03 18:22:07 UTC

svn commit: r1547488 - /subversion/trunk/subversion/tests/cmdline/svntest/main.py

Author: stefan2
Date: Tue Dec  3 17:22:07 2013
New Revision: 1547488

URL: http://svn.apache.org/r1547488
Log:
Correctly handle the absence of MINOR_VERSION when creating test repositories
in the 'create_repos' helper.  "if not MINOR_VERSION" in this case is
equivalent to "if MINOR_VERSION is None or MINOR_VERSION == 0", which behaves
incorrectly for the case when the caller actually passes MINOR_VERSION = 0.
Follow-up to r1245799.

* subversion/tests/cmdline/svntest/main.py
  (create_repos): Use "if is None" instead of "if not" when checking the
    MINOR_VERSION for absence.

Patch by: Evgeny Kotkov <evgeny.kotkov{_AT_}visualsvn.com>

Modified:
    subversion/trunk/subversion/tests/cmdline/svntest/main.py

Modified: subversion/trunk/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/main.py?rev=1547488&r1=1547487&r2=1547488&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/main.py Tue Dec  3 17:22:07 2013
@@ -892,7 +892,7 @@ def create_repos(path, minor_version = N
     os.makedirs(path) # this creates all the intermediate dirs, if neccessary
 
   opts = ("--bdb-txn-nosync",)
-  if not minor_version or minor_version > options.server_minor_version:
+  if minor_version is None or minor_version > options.server_minor_version:
     minor_version = options.server_minor_version
   opts += ("--compatible-version=1.%d" % (minor_version),)
   if options.fs_type is not None: