Author: rjollos
Date: Mon Sep 30 05:31:04 2013
New Revision: 1527446
URL: http://svn.apache.org/r1527446
Log:
0.8dev: Added attribute `apply_bhwiki_upgrades` to control when Bloodhound wiki
upgrades are applied. This will allow the upgrades to be skipped when running
the functional tests. Refs #387.
Patch by Olemis Lang.
Modified:
bloodhound/trunk/installer/bloodhound_setup.py
Modified: bloodhound/trunk/installer/bloodhound_setup.py
URL:
http://svn.apache.org/viewvc/bloodhound/trunk/installer/bloodhound_setup.py?rev=1527446&r1=1527445&r2=1527446&view=diff
==============================================================================
--- bloodhound/trunk/installer/bloodhound_setup.py (original)
+++ bloodhound/trunk/installer/bloodhound_setup.py Mon Sep 30 05:31:04 2013
@@ -133,6 +133,9 @@ class BloodhoundSetup(object):
options['envsdir'] = os.path.join('bloodhound',
'environments')
+ # Flags used when running the functional test suite
+ self.apply_bhwiki_upgrades = True
+
def _generate_db_str(self, options):
"""Builds an appropriate db string for trac-admin for sqlite and
postgres options. Also allows for a user to provide their own db string
@@ -266,8 +269,11 @@ class BloodhoundSetup(object):
print "Running wiki upgrades"
bloodhound.onecmd('wiki upgrade')
- print "Running wiki Bloodhound upgrades"
- bloodhound.onecmd('wiki bh-upgrade')
+ if self.apply_bhwiki_upgrades:
+ print "Running wiki Bloodhound upgrades"
+ bloodhound.onecmd('wiki bh-upgrade')
+ else:
+ print "Skipping Bloodhound wiki upgrades"
print "Loading default product wiki"
bloodhound.onecmd('product admin %s wiki load %s' %
@@ -278,9 +284,12 @@ class BloodhoundSetup(object):
bloodhound.onecmd('product admin %s wiki upgrade' %
default_product_prefix)
- print "Running default product wiki Bloodhound upgrades"
- bloodhound.onecmd('product admin %s wiki bh-upgrade' %
- default_product_prefix)
+ if self.apply_bhwiki_upgrades:
+ print "Running default product Bloodhound wiki upgrades"
+ bloodhound.onecmd('product admin %s wiki bh-upgrade' %
+ default_product_prefix)
+ else:
+ print "Skipping default product Bloodhound wiki upgrades"
print """
You can now start Bloodhound by running: