aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJames Tunnicliffe <james.tunnicliffe@linaro.org>2012-08-23 19:27:23 +0100
committerJames Tunnicliffe <james.tunnicliffe@linaro.org>2012-08-23 19:27:23 +0100
commita9364ab2502827633e06181ac8a218d7a3920d87 (patch)
tree61db5a1eac5d28c78c82f20498190fba3c6eb1bf /scripts
parentb37954a6846f4ac2c81c6d6106d73250ac0193af (diff)
Using bzr command line directly instead of bzrlib since we were seeing odd issues.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/update-deployment.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/update-deployment.py b/scripts/update-deployment.py
index f244d68..161148d 100755
--- a/scripts/update-deployment.py
+++ b/scripts/update-deployment.py
@@ -66,12 +66,13 @@ class UpdateDeploymentScript(LinaroScript):
"""Refreshes a branch checked-out to a branch_dir."""
code_branch = bzrlib.branch.Branch.open(branch_dir)
- parent_branch = bzrlib.branch.Branch.open(
- code_branch.get_parent())
- result = code_branch.pull(source=parent_branch)
- if result.old_revno != result.new_revno:
+ old_revno = code_branch.last_revision_info()[0]
+ self.run_subcommand(["bzr", "pull"], branch_dir)
+ new_revno = code_branch.last_revision_info()[0]
+
+ if old_revno != new_revno:
self.logger.info("Updated %s from %d to %d.",
- branch_dir, result.old_revno, result.new_revno)
+ branch_dir, old_revno, new_revno)
else:
self.logger.info(
"No changes to pull from %s.", code_branch.get_parent())
@@ -81,8 +82,7 @@ class UpdateDeploymentScript(LinaroScript):
def update_tree(self, working_tree_dir):
"""Does a checkout update."""
- code_tree = bzrlib.workingtree.WorkingTree.open(working_tree_dir)
- code_tree.update()
+ self.run_subcommand(["bzr", "up"], working_tree_dir)
def run_subcommand(self, arguments, cwd=None):
process = subprocess.Popen(arguments, cwd=cwd, stdout=subprocess.PIPE,