def __init__(self,project_dbupgrade): printMsg = True self.project_dbupgrade = project_dbupgrade self.checkout_branch = version.getSVNBranch('.') self.checkout_revision = self.getCheckOutRevision() self.db_revision = self.getDatabaseRevision(printMsg) self.db_branch = self.getDatabaseSVNBranch(printMsg)
def getPackageVersion(self): ''' This function outputs the string to put in database as the version of myami package. It uses getSVNBranch gives branch name from either svn or text and strip off myami- if from a branch ''' svn_branch = version.getSVNBranch('.') if svn_branch == 'trunk': version_log = svn_branch elif 'myami-' in svn_branch: version_log = svn_branch.split('-')[-1] else: raise "Unknown svn branch" return version_log