[Branch,~linaro-validation/lava-test/trunk] Rev 178: simplify bzr logic in the installer

Message ID 20120920152412.11715.53788.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Andy Doan Sept. 20, 2012, 3:24 p.m.
------------------------------------------------------------
revno: 178
committer: Andy Doan <andy.doan@linaro.org>
branch nick: trunk
timestamp: Thu 2012-09-20 10:13:23 -0500
message:
  simplify bzr logic in the installer
modified:
  lava_test/core/installers.py


--
lp:lava-test
https://code.launchpad.net/~linaro-validation/lava-test/trunk

You are subscribed to branch lp:lava-test.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-test/trunk/+edit-subscription

Patch

=== modified file 'lava_test/core/installers.py'
--- lava_test/core/installers.py	2012-09-19 17:11:20 +0000
+++ lava_test/core/installers.py	2012-09-20 15:13:23 +0000
@@ -171,13 +171,9 @@ 
     @staticmethod
     def _bzr_source(testdir, dirname):
         with changed_directory('%s/%s' % (testdir, dirname)):
-            revno = subprocess.check_output(
-                ['bzr', 'log', '-r', '-1', '--log-format=line']).split(':')[0]
-            info = subprocess.check_output(['bzr', 'info'])
-            for line in info.split('\n'):
-                line = line.strip()
-                if line.startswith('parent branch:'):
-                    url = line.split(':', 1)[-1]
+            revno = subprocess.check_output(['bzr', 'revno']).strip()
+            url = subprocess.check_output(
+                ['bzr', 'config', 'parent_location']).strip()
             return {
                 'project_name': dirname,
                 'branch_vcs': 'bzr',