Merge lp:~jelmer/brz/steal-dead-default into lp:brz

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: no longer in the source branch.
Merge reported by: The Breezy Bot
Merged at revision: not available
Proposed branch: lp:~jelmer/brz/steal-dead-default
Merge into: lp:brz
Diff against target: 70 lines (+10/-7)
4 files modified
breezy/config.py (+1/-1)
breezy/help_topics/en/configuration.txt (+2/-2)
breezy/tests/test_lockdir.py (+4/-4)
doc/en/release-notes/brz-3.1.txt (+3/-0)
To merge this branch: bzr merge lp:~jelmer/brz/steal-dead-default
Reviewer Review Type Date Requested Status
Martin Packman Approve
Review via email: mp+369321@code.launchpad.net

Commit message

Enable locks.steal_dead by default.

Description of the change

Enable locks.steal_dead by default.

To post a comment you must log in.
Revision history for this message
Martin Packman (gz) wrote :

Thanks!

review: Approve
Revision history for this message
The Breezy Bot (the-breezy-bot) wrote :
Revision history for this message
The Breezy Bot (the-breezy-bot) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'breezy/config.py'
2--- breezy/config.py 2019-06-26 20:41:57 +0000
3+++ breezy/config.py 2019-07-07 18:18:57 +0000
4@@ -2560,7 +2560,7 @@
5 Option('language',
6 help='Language to translate messages into.'))
7 option_registry.register(
8- Option('locks.steal_dead', default=False, from_unicode=bool_from_store,
9+ Option('locks.steal_dead', default=True, from_unicode=bool_from_store,
10 help='''\
11 Steal locks that appears to be dead.
12
13
14=== modified file 'breezy/help_topics/en/configuration.txt'
15--- breezy/help_topics/en/configuration.txt 2018-11-08 03:33:22 +0000
16+++ breezy/help_topics/en/configuration.txt 2019-07-07 18:18:57 +0000
17@@ -527,8 +527,8 @@
18 locks.steal_dead
19 ~~~~~~~~~~~~~~~~
20
21-If set to true, bzr will automatically break locks held by processes from
22-the same machine and user that are no longer alive. Otherwise, it will
23+By default, bzr will automatically break locks held by processes from
24+the same machine and user that are no longer alive. If disabled, it will
25 print a message and you can break the lock manually, if you are satisfied
26 the object is no longer in use.
27
28
29=== modified file 'breezy/tests/test_lockdir.py'
30--- breezy/tests/test_lockdir.py 2018-11-11 04:08:32 +0000
31+++ breezy/tests/test_lockdir.py 2019-07-07 18:18:57 +0000
32@@ -735,9 +735,7 @@
33 """
34 self.overrideAttr(lockdir, 'get_host_name',
35 lambda: 'aproperhostname')
36- # This is off by default at present; see the discussion in the bug.
37- # If you change the default, don't forget to update the docs.
38- config.GlobalStack().set('locks.steal_dead', True)
39+ # Stealing dead locks is enabled by default.
40 # Create a lock pretending to come from a different nonexistent
41 # process on the same machine.
42 l1 = LockDir(self.get_transport(), 'a',
43@@ -754,10 +752,12 @@
44 """Automatic breaking can be turned off"""
45 l1 = LockDir(self.get_transport(), 'a',
46 extra_holder_info={'pid': '12312313'})
47+ # Stealing dead locks is enabled by default, so disable it.
48+ config.GlobalStack().set('locks.steal_dead', False)
49 token_1 = l1.attempt_lock()
50 self.addCleanup(l1.unlock)
51 l2 = LockDir(self.get_transport(), 'a')
52- # This fails now, because dead lock breaking is off by default.
53+ # This fails now, because dead lock breaking is disabled.
54 self.assertRaises(LockContention,
55 l2.attempt_lock)
56 # and it's in fact not broken
57
58=== modified file 'doc/en/release-notes/brz-3.1.txt'
59--- doc/en/release-notes/brz-3.1.txt 2019-07-07 18:00:25 +0000
60+++ doc/en/release-notes/brz-3.1.txt 2019-07-07 18:18:57 +0000
61@@ -54,6 +54,9 @@
62 * Automatically upgrade to branch format 8 when setting branch references.
63 (Jelmer Vernooij)
64
65+* ``locks.steal_dead`` is now enabled by default.
66+ (Jelmer Vernooij, #220464)
67+
68 * The substitution variables for the ``change_editor`` configuration
69 option are now "{old_path}" and "{new_path}" rather than "@old_path" and
70 "@new_path". The former is more consistent with the way substitutions

Subscribers

People subscribed via source and target branches