Updated the build script to run a revert first.

This commit is contained in:
Raoul Snyman 2011-03-18 17:28:51 +02:00
parent be3a4e680c
commit afe6f706bb

View File

@ -116,8 +116,15 @@ dist_path = os.path.join(branch_path, u'dist', u'OpenLP')
enchant_path = os.path.join(site_packages, u'enchant')
def update_code():
print u'Updating the code...'
os.chdir(branch_path)
print u'Reverting any changes to the code...'
bzr = Popen((u'bzr', u'revert'), stdout=PIPE)
output, error = bzr.communicate()
code = bzr.wait()
if code != 0:
print output
raise Exception(u'Error reverting the code')
print u'Updating the code...'
bzr = Popen((u'bzr', u'update'), stdout=PIPE)
output, error = bzr.communicate()
code = bzr.wait()