Merge lp:~james-w/tarmac/lock-contention into lp:tarmac

Proposed by James Westby
Status: Superseded
Proposed branch: lp:~james-w/tarmac/lock-contention
Merge into: lp:tarmac
Prerequisite: lp:~james-w/tarmac/one-at-a-time
Diff against target: 67 lines (+3/-16)
1 file modified
tarmac/bin/commands.py (+3/-16)
To merge this branch: bzr merge lp:~james-w/tarmac/lock-contention
Reviewer Review Type Date Requested Status
Paul Hummer Pending
Review via email: mp+145975@code.launchpad.net

This proposal supersedes a proposal from 2013-01-24.

This proposal has been superseded by a proposal from 2013-02-01.

Description of the change

Ignore LockContention errors when trying to merge a branch.

(from the u1 fork)

To post a comment you must log in.

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'tarmac/bin/commands.py'
--- tarmac/bin/commands.py 2013-02-01 17:15:24 +0000
+++ tarmac/bin/commands.py 2013-02-01 17:15:24 +0000
@@ -5,7 +5,7 @@
5import re5import re
66
7from bzrlib.commands import Command7from bzrlib.commands import Command
8from bzrlib.errors import PointlessMerge8from bzrlib.errors import PointlessMerge, LockContention
9from bzrlib.help import help_commands9from bzrlib.help import help_commands
10from launchpadlib.launchpad import Launchpad10from launchpadlib.launchpad import Launchpad
11from launchpadlib.uris import (LPNET_SERVICE_ROOT,11from launchpadlib.uris import (LPNET_SERVICE_ROOT,
@@ -163,12 +163,8 @@
163 target = Branch.create(lp_branch, self.config, create_tree=True)163 target = Branch.create(lp_branch, self.config, create_tree=True)
164164
165 self.logger.debug('Firing tarmac_pre_merge hook')165 self.logger.debug('Firing tarmac_pre_merge hook')
166<<<<<<< TREE
167 tarmac_hooks.fire('tarmac_pre_merge',166 tarmac_hooks.fire('tarmac_pre_merge',
168 self, target)167 self, target)
169=======
170 tarmac_hooks['tarmac_pre_merge'].fire(self, target)
171>>>>>>> MERGE-SOURCE
172168
173 success_count = 0169 success_count = 0
174 try:170 try:
@@ -286,19 +282,12 @@
286 reviews=self._get_reviews(proposal))282 reviews=self._get_reviews(proposal))
287283
288 self.logger.debug('Firing tarmac_post_commit hook')284 self.logger.debug('Firing tarmac_post_commit hook')
289<<<<<<< TREE
290 tarmac_hooks.fire('tarmac_post_commit',285 tarmac_hooks.fire('tarmac_post_commit',
291 self, target, source, proposal)286 self, target, source, proposal)
292 success_count += 1287 success_count += 1
293 target.cleanup()288 target.cleanup()
294=======
295 tarmac_hooks['tarmac_post_commit'].fire(
296 self, target, source, proposal)
297
298 # If we've been asked to only merge one branch, then exit.
299 if self.config.one:289 if self.config.one:
300 return True290 return True
301>>>>>>> MERGE-SOURCE
302291
303 # This except is here because we need the else and can't have it292 # This except is here because we need the else and can't have it
304 # without an except as well.293 # without an except as well.
@@ -306,12 +295,8 @@
306 raise295 raise
307 else:296 else:
308 self.logger.debug('Firing tarmac_post_merge hook')297 self.logger.debug('Firing tarmac_post_merge hook')
309<<<<<<< TREE
310 tarmac_hooks.fire('tarmac_post_merge',298 tarmac_hooks.fire('tarmac_post_merge',
311 self, target, success_count=success_count)299 self, target, success_count=success_count)
312=======
313 tarmac_hooks['tarmac_post_merge'].fire(self, target)
314>>>>>>> MERGE-SOURCE
315 finally:300 finally:
316 target.cleanup()301 target.cleanup()
317302
@@ -389,6 +374,8 @@
389 # If we've been asked to only merge one branch, then exit.374 # If we've been asked to only merge one branch, then exit.
390 if merged and self.config.one:375 if merged and self.config.one:
391 break376 break
377 except LockContention:
378 continue
392 except Exception, error:379 except Exception, error:
393 self.logger.error(380 self.logger.error(
394 'An error occurred trying to merge %s: %s',381 'An error occurred trying to merge %s: %s',

Subscribers

People subscribed via source and target branches