Merge lp:~james-w/tarmac/exit-status into lp:tarmac

Proposed by James Westby
Status: Rejected
Rejected by: dobey
Proposed branch: lp:~james-w/tarmac/exit-status
Merge into: lp:tarmac
Prerequisite: lp:~james-w/tarmac/break-up-do-merges
Diff against target: 54 lines (+9/-4)
4 files modified
bin/tarmac (+3/-1)
tarmac/bin/__init__.py (+1/-1)
tarmac/bin/commands.py (+3/-0)
tarmac/bin/registry.py (+2/-2)
To merge this branch: bzr merge lp:~james-w/tarmac/exit-status
Reviewer Review Type Date Requested Status
dobey Disapprove
Paul Hummer Approve
Review via email: mp+144810@code.launchpad.net

Commit message

Return exit status of the tarmac script.

Description of the change

This allows the commands to set an exit status for the whole
tarmac script. We need it so that we can communicate some status
information to jenkins.

(from the u1 fork)

To post a comment you must log in.
Revision history for this message
Paul Hummer (rockstar) :
review: Approve
Revision history for this message
Paul Hummer (rockstar) wrote :

The prerequisite lp:~james-w/tarmac/break-up-do-merges has not yet been merged into lp:tarmac.

Revision history for this message
dobey (dobey) wrote :

Please create bugs for the issues, include tests, and split the changes into a branch or two which do not have unnecessary dependencies on other unrelated changes.

review: Disapprove

Unmerged revisions

424. By James Westby

Merged break-up-do-merges into exit-status.

423. By James Westby

Merged break-up-do-merges into exit-status.

422. By James Westby

Merged break-up-do-merges into exit-status.

421. By James Westby

Merged break-up-do-merges into exit-status.

420. By James Westby

Merged break-up-do-merges into exit-status.

419. By James Westby

Allow the command to set the exit status.

418. By James Westby

Remove the option that isn't defined yet.

417. By James Westby

Break up the very large do_merges method somewhat.

416. By James Westby

Add the commit message plugin that sets [r=<reviewer>] and bug info.

415. By James Westby

Decode stderr/stdout from the command, ignoring errors.

We were seeing UnicodeDecodeErrors in Jenkins on occaision, so
we changed the code to be more robust, and to discard anything
that couldn't be decoded from utf-8.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bin/tarmac'
--- bin/tarmac 2010-06-17 17:23:37 +0000
+++ bin/tarmac 2013-02-01 17:17:22 +0000
@@ -2,5 +2,7 @@
2# vim:filetype=python2# vim:filetype=python
3'''Main tarmac script.'''3'''Main tarmac script.'''
44
5import sys
6
5from tarmac.bin import main7from tarmac.bin import main
6main()8sys.exit(main())
79
=== modified file 'tarmac/bin/__init__.py'
--- tarmac/bin/__init__.py 2010-09-02 15:18:07 +0000
+++ tarmac/bin/__init__.py 2013-02-01 17:17:22 +0000
@@ -27,4 +27,4 @@
27 args = sys.argv[1:]27 args = sys.argv[1:]
28 if not args:28 if not args:
29 args = ['help']29 args = ['help']
30 registry.run(args)30 return registry.run(args)
3131
=== modified file 'tarmac/bin/commands.py'
--- tarmac/bin/commands.py 2013-02-01 17:17:22 +0000
+++ tarmac/bin/commands.py 2013-02-01 17:17:22 +0000
@@ -397,3 +397,6 @@
397 'An error occurred trying to merge %s: %s',397 'An error occurred trying to merge %s: %s',
398 branch, error)398 branch, error)
399 raise399 raise
400 if len(filter(lambda x: x is False, statuses)) > 0:
401 return 2
402 return 0
400403
=== modified file 'tarmac/bin/registry.py'
--- tarmac/bin/registry.py 2010-10-25 20:20:18 +0000
+++ tarmac/bin/registry.py 2013-02-01 17:17:22 +0000
@@ -45,7 +45,7 @@
4545
46 def _run(self, args):46 def _run(self, args):
47 '''Execute the command.'''47 '''Execute the command.'''
48 run_bzr(args)48 return run_bzr(args)
4949
50 def install_hooks(self):50 def install_hooks(self):
51 '''Use the bzrlib Command support for running commands.'''51 '''Use the bzrlib Command support for running commands.'''
@@ -57,7 +57,7 @@
57 def run(self, args):57 def run(self, args):
58 '''Execute the command.'''58 '''Execute the command.'''
59 try:59 try:
60 self._run(args)60 return self._run(args)
61 except BzrCommandError, e:61 except BzrCommandError, e:
62 sys.exit('tarmac: ERROR: ' + str(e))62 sys.exit('tarmac: ERROR: ' + str(e))
6363

Subscribers

People subscribed via source and target branches