Skip to content

Commit

Permalink
only create the db tables if the revmap is explicitly enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
cotto committed Aug 20, 2010
1 parent e2b3484 commit 172cdfb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions github/github.py
Expand Up @@ -39,12 +39,12 @@ def __init__(self):

# IEnvironmentSetupParticpant methods
def environment_created(self):
if self.revmap:
if self.enable_revmap:
self._upgrade_db(self.env.get_db_cnx())

#return true if the db table doesn't exist or needs to be updated
def environment_needs_upgrade(self, db):
if self.revmap == 0:
if self.enable_revmap == 0:
return False
if self.reread_revmap:
self.config.set('github.reread_revmap', 0)
Expand All @@ -62,7 +62,8 @@ def environment_needs_upgrade(self, db):
return True

def upgrade_environment(self, db):
self._upgrade_db(db)
if self.enable_revmap:
self._upgrade_db(db)

def _upgrade_db(self, db):
#open the revision map
Expand Down

0 comments on commit 172cdfb

Please sign in to comment.