Rev 6071: (jelmer) Cope with the localhost having the name 'localhost' when running in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Mon Aug 15 13:49:42 UTC 2011


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 6071 [merge]
revision-id: pqm at pqm.ubuntu.com-20110815134938-4fuo63g4v2hj8jdt
parent: pqm at pqm.ubuntu.com-20110815092257-dqso39eg1ogfrlg7
parent: jelmer at samba.org-20110813211700-ppz4rr0byrgti465
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2011-08-15 13:49:38 +0000
message:
  (jelmer) Cope with the localhost having the name 'localhost' when running
   the test suite. (Jelmer Vernooij)
modified:
  bzrlib/tests/test_lockdir.py   test_lockdir.py-20060220222025-33d4221569a3d600
  doc/en/release-notes/bzr-2.5.txt bzr2.5.txt-20110708125756-587p0hpw7oke4h05-1
=== modified file 'bzrlib/tests/test_lockdir.py'
--- a/bzrlib/tests/test_lockdir.py	2011-08-08 17:52:59 +0000
+++ b/bzrlib/tests/test_lockdir.py	2011-08-15 13:49:38 +0000
@@ -682,6 +682,8 @@
 
     def test_lock_holder_dead_process(self):
         """Detect that the holder (this process) is still running."""
+        self.overrideAttr(lockdir, 'get_host_name',
+            lambda: 'aproperhostname')
         info = LockHeldInfo.for_this_process(None)
         info.info_dict['pid'] = '123123123'
         self.assertTrue(info.is_lock_holder_known_dead())
@@ -726,6 +728,8 @@
 
         This generates a warning but no other user interaction.
         """
+        self.overrideAttr(lockdir, 'get_host_name',
+            lambda: 'aproperhostname')
         # This is off by default at present; see the discussion in the bug.
         # If you change the default, don't forget to update the docs.
         config.GlobalConfig().set_user_option('locks.steal_dead', True)

=== modified file 'doc/en/release-notes/bzr-2.5.txt'
--- a/doc/en/release-notes/bzr-2.5.txt	2011-08-12 14:07:21 +0000
+++ b/doc/en/release-notes/bzr-2.5.txt	2011-08-15 13:49:38 +0000
@@ -190,6 +190,9 @@
 
 * Fix compatibility with testtools 0.9.12. (Jelmer Vernooij, #815423)
 
+* ``LockDir`` can now be run when the local hostname is ``localhost``.
+  (Jelmer Vernooij, #825994)
+
 * `TestCaseWithMemoryTransport` is faster now: `_check_safety_net` now
   just compares the bytes in the dirstate file to its pristine state,
   rather than opening the WorkingTree and calling ``last_revision()``.




More information about the bazaar-commits mailing list