From afe6f706bbe7cbcd18c290d8555993ab6b0bc5b0 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Fri, 18 Mar 2011 17:28:51 +0200 Subject: [PATCH] Updated the build script to run a revert first. --- scripts/windows-builder.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/windows-builder.py b/scripts/windows-builder.py index b4085712f..c8cb1df06 100644 --- a/scripts/windows-builder.py +++ b/scripts/windows-builder.py @@ -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()