Rev 6552: (vila) Restores the HOME check around creating the test safety net (Vincent in file:///srv/pqm.bazaar-vcs.org/archives/thelove/bzr/%2Btrunk/

Patch Queue Manager pqm at pqm.ubuntu.com
Fri Aug 3 10:01:45 UTC 2012


At file:///srv/pqm.bazaar-vcs.org/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 6552 [merge]
revision-id: pqm at pqm.ubuntu.com-20120803100145-jt69roowxjfxv0mx
parent: pqm at pqm.ubuntu.com-20120802151743-ht3zipt6g7dgmk2v
parent: v.ladeuil+lp at free.fr-20120803093546-864avf43u8d9lupn
committer: Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Fri 2012-08-03 10:01:45 +0000
message:
  (vila) Restores the HOME check around creating the test safety net (Vincent
   Ladeuil)
modified:
  bzrlib/tests/__init__.py       selftest.py-20050531073622-8d0e3c8845c97a64
=== modified file 'bzrlib/tests/__init__.py'
--- a/bzrlib/tests/__init__.py	2012-06-18 11:43:07 +0000
+++ b/bzrlib/tests/__init__.py	2012-08-03 09:35:46 +0000
@@ -2595,13 +2595,16 @@
         real branch.
         """
         root = TestCaseWithMemoryTransport.TEST_ROOT
-        # Make sure we get a readable and accessible home for .bzr.log
-        # and/or config files, and not fallback to weird defaults (see
-        # http://pad.lv/825027).
-        self.assertIs(None, os.environ.get('BZR_HOME', None))
-        os.environ['BZR_HOME'] = root
-        wt = controldir.ControlDir.create_standalone_workingtree(root)
-        del os.environ['BZR_HOME']
+        try:
+            # Make sure we get a readable and accessible home for .bzr.log
+            # and/or config files, and not fallback to weird defaults (see
+            # http://pad.lv/825027).
+            self.assertIs(None, os.environ.get('BZR_HOME', None))
+            os.environ['BZR_HOME'] = root
+            wt = controldir.ControlDir.create_standalone_workingtree(root)
+            del os.environ['BZR_HOME']
+        except Exception, e:
+            self.fail("Fail to initialize the safety net: %r\n" % (e,))
         # Hack for speed: remember the raw bytes of the dirstate file so that
         # we don't need to re-open the wt to check it hasn't changed.
         TestCaseWithMemoryTransport._SAFETY_NET_PRISTINE_DIRSTATE = (




More information about the bazaar-commits mailing list