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
1=== modified file 'tarmac/bin/commands.py'
2--- tarmac/bin/commands.py 2013-02-01 17:15:24 +0000
3+++ tarmac/bin/commands.py 2013-02-01 17:15:24 +0000
4@@ -5,7 +5,7 @@
5 import re
6
7 from bzrlib.commands import Command
8-from bzrlib.errors import PointlessMerge
9+from bzrlib.errors import PointlessMerge, LockContention
10 from bzrlib.help import help_commands
11 from launchpadlib.launchpad import Launchpad
12 from launchpadlib.uris import (LPNET_SERVICE_ROOT,
13@@ -163,12 +163,8 @@
14 target = Branch.create(lp_branch, self.config, create_tree=True)
15
16 self.logger.debug('Firing tarmac_pre_merge hook')
17-<<<<<<< TREE
18 tarmac_hooks.fire('tarmac_pre_merge',
19 self, target)
20-=======
21- tarmac_hooks['tarmac_pre_merge'].fire(self, target)
22->>>>>>> MERGE-SOURCE
23
24 success_count = 0
25 try:
26@@ -286,19 +282,12 @@
27 reviews=self._get_reviews(proposal))
28
29 self.logger.debug('Firing tarmac_post_commit hook')
30-<<<<<<< TREE
31 tarmac_hooks.fire('tarmac_post_commit',
32 self, target, source, proposal)
33 success_count += 1
34 target.cleanup()
35-=======
36- tarmac_hooks['tarmac_post_commit'].fire(
37- self, target, source, proposal)
38-
39- # If we've been asked to only merge one branch, then exit.
40 if self.config.one:
41 return True
42->>>>>>> MERGE-SOURCE
43
44 # This except is here because we need the else and can't have it
45 # without an except as well.
46@@ -306,12 +295,8 @@
47 raise
48 else:
49 self.logger.debug('Firing tarmac_post_merge hook')
50-<<<<<<< TREE
51 tarmac_hooks.fire('tarmac_post_merge',
52 self, target, success_count=success_count)
53-=======
54- tarmac_hooks['tarmac_post_merge'].fire(self, target)
55->>>>>>> MERGE-SOURCE
56 finally:
57 target.cleanup()
58
59@@ -389,6 +374,8 @@
60 # If we've been asked to only merge one branch, then exit.
61 if merged and self.config.one:
62 break
63+ except LockContention:
64+ continue
65 except Exception, error:
66 self.logger.error(
67 'An error occurred trying to merge %s: %s',

Subscribers

People subscribed via source and target branches