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
=== modified file 'breezy/config.py'
--- breezy/config.py 2019-06-26 20:41:57 +0000
+++ breezy/config.py 2019-07-07 18:18:57 +0000
@@ -2560,7 +2560,7 @@
2560 Option('language',2560 Option('language',
2561 help='Language to translate messages into.'))2561 help='Language to translate messages into.'))
2562option_registry.register(2562option_registry.register(
2563 Option('locks.steal_dead', default=False, from_unicode=bool_from_store,2563 Option('locks.steal_dead', default=True, from_unicode=bool_from_store,
2564 help='''\2564 help='''\
2565Steal locks that appears to be dead.2565Steal locks that appears to be dead.
25662566
25672567
=== modified file 'breezy/help_topics/en/configuration.txt'
--- breezy/help_topics/en/configuration.txt 2018-11-08 03:33:22 +0000
+++ breezy/help_topics/en/configuration.txt 2019-07-07 18:18:57 +0000
@@ -527,8 +527,8 @@
527locks.steal_dead527locks.steal_dead
528~~~~~~~~~~~~~~~~528~~~~~~~~~~~~~~~~
529529
530If set to true, bzr will automatically break locks held by processes from530By default, bzr will automatically break locks held by processes from
531the same machine and user that are no longer alive. Otherwise, it will531the same machine and user that are no longer alive. If disabled, it will
532print a message and you can break the lock manually, if you are satisfied532print a message and you can break the lock manually, if you are satisfied
533the object is no longer in use.533the object is no longer in use.
534534
535535
=== modified file 'breezy/tests/test_lockdir.py'
--- breezy/tests/test_lockdir.py 2018-11-11 04:08:32 +0000
+++ breezy/tests/test_lockdir.py 2019-07-07 18:18:57 +0000
@@ -735,9 +735,7 @@
735 """735 """
736 self.overrideAttr(lockdir, 'get_host_name',736 self.overrideAttr(lockdir, 'get_host_name',
737 lambda: 'aproperhostname')737 lambda: 'aproperhostname')
738 # This is off by default at present; see the discussion in the bug.738 # Stealing dead locks is enabled by default.
739 # If you change the default, don't forget to update the docs.
740 config.GlobalStack().set('locks.steal_dead', True)
741 # Create a lock pretending to come from a different nonexistent739 # Create a lock pretending to come from a different nonexistent
742 # process on the same machine.740 # process on the same machine.
743 l1 = LockDir(self.get_transport(), 'a',741 l1 = LockDir(self.get_transport(), 'a',
@@ -754,10 +752,12 @@
754 """Automatic breaking can be turned off"""752 """Automatic breaking can be turned off"""
755 l1 = LockDir(self.get_transport(), 'a',753 l1 = LockDir(self.get_transport(), 'a',
756 extra_holder_info={'pid': '12312313'})754 extra_holder_info={'pid': '12312313'})
755 # Stealing dead locks is enabled by default, so disable it.
756 config.GlobalStack().set('locks.steal_dead', False)
757 token_1 = l1.attempt_lock()757 token_1 = l1.attempt_lock()
758 self.addCleanup(l1.unlock)758 self.addCleanup(l1.unlock)
759 l2 = LockDir(self.get_transport(), 'a')759 l2 = LockDir(self.get_transport(), 'a')
760 # This fails now, because dead lock breaking is off by default.760 # This fails now, because dead lock breaking is disabled.
761 self.assertRaises(LockContention,761 self.assertRaises(LockContention,
762 l2.attempt_lock)762 l2.attempt_lock)
763 # and it's in fact not broken763 # and it's in fact not broken
764764
=== modified file 'doc/en/release-notes/brz-3.1.txt'
--- doc/en/release-notes/brz-3.1.txt 2019-07-07 18:00:25 +0000
+++ doc/en/release-notes/brz-3.1.txt 2019-07-07 18:18:57 +0000
@@ -54,6 +54,9 @@
54* Automatically upgrade to branch format 8 when setting branch references.54* Automatically upgrade to branch format 8 when setting branch references.
55 (Jelmer Vernooij)55 (Jelmer Vernooij)
5656
57* ``locks.steal_dead`` is now enabled by default.
58 (Jelmer Vernooij, #220464)
59
57* The substitution variables for the ``change_editor`` configuration60* The substitution variables for the ``change_editor`` configuration
58 option are now "{old_path}" and "{new_path}" rather than "@old_path" and61 option are now "{old_path}" and "{new_path}" rather than "@old_path" and
59 "@new_path". The former is more consistent with the way substitutions62 "@new_path". The former is more consistent with the way substitutions

Subscribers

People subscribed via source and target branches