Merge lp:~1chb1n/openstack-mojo-specs/fix-git-checkout-stable into lp:openstack-mojo-specs

Proposed by Ryan Beisner on 2016-04-17
Status: Merged
Merged at revision: 254
Proposed branch: lp:~1chb1n/openstack-mojo-specs/fix-git-checkout-stable
Merge into: lp:openstack-mojo-specs
Diff against target: 38 lines (+11/-2)
2 files modified
helper/setup/git_checkout_stable.py (+3/-0)
helper/utils/mojo_utils.py (+8/-2)
To merge this branch: bzr merge lp:~1chb1n/openstack-mojo-specs/fix-git-checkout-stable
Reviewer Review Type Date Requested Status
Liam Young 2016-04-17 Approve on 2016-04-18
Review via email: mp+292078@code.launchpad.net

Commit Message

Update git_checkout_stable to initiate logger and show remotes and branches

Description of the Change

The stable update script was attempting to log, but no logger was initiated. Automated runs of stable charm mojo specs showed no confirmation of the branch in use.

Update git_checkout_stable to initiate logger and show remotes and branches

Example output with these changes:
http://pastebin.ubuntu.com/15913007/

To post a comment you must log in.
257. By Ryan Beisner on 2016-04-17

Cleanup

charm_lint_check #2310 mojo-openstack-specs for 1chb1n mp292078
    LINT OK: passed

Build: http://10.245.162.36:8080/job/charm_lint_check/2310/

258. By Ryan Beisner on 2016-04-17

Condense

charm_lint_check #2311 mojo-openstack-specs for 1chb1n mp292078
    LINT OK: passed

Build: http://10.245.162.36:8080/job/charm_lint_check/2311/

Liam Young (gnuoy) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'helper/setup/git_checkout_stable.py'
2--- helper/setup/git_checkout_stable.py 2016-04-12 08:43:49 +0000
3+++ helper/setup/git_checkout_stable.py 2016-04-17 04:46:24 +0000
4@@ -1,9 +1,12 @@
5 #!/usr/bin/python
6+import logging
7 import sys
8 import utils.mojo_utils as mojo_utils
9
10
11 def main(argv):
12+ log = logging.getLogger()
13+ log.setLevel(logging.DEBUG)
14 mojo_utils.git_checkout_all('stable')
15
16 if __name__ == "__main__":
17
18=== modified file 'helper/utils/mojo_utils.py'
19--- helper/utils/mojo_utils.py 2016-04-12 08:50:09 +0000
20+++ helper/utils/mojo_utils.py 2016-04-17 04:46:24 +0000
21@@ -358,9 +358,15 @@
22
23
24 def git_checkout_branch(charmdir, branch):
25- cmd = ['git', '-C', charmdir, 'checkout', branch]
26+ # Check out branch, show remotes and branches
27 logging.info('Checking out {} in {}'.format(branch, charmdir))
28- subprocess.check_call(cmd)
29+ cmds = [
30+ ['git', '-C', charmdir, 'checkout', branch],
31+ ['git', '-C', charmdir, 'remote', '-v'],
32+ ['git', '-C', charmdir, 'branch', '-lv', '--no-abbrev'],
33+ ]
34+ for cmd in cmds:
35+ subprocess.check_call(cmd)
36
37
38 def git_checkout_all(branch):

Subscribers

People subscribed via source and target branches