Rev 5096: Merge lp:bzr/2.1 into 2.2 resolving conflicts in http://bazaar.launchpad.net/~vila/bzr/2.2-integration/

Vincent Ladeuil v.ladeuil+lp at free.fr
Mon Sep 27 08:24:57 BST 2010


At http://bazaar.launchpad.net/~vila/bzr/2.2-integration/

------------------------------------------------------------
revno: 5096 [merge]
revision-id: v.ladeuil+lp at free.fr-20100927072454-d47ejtl535tuggte
parent: pqm at pqm.ubuntu.com-20100924040418-6qdmznzobshvelxm
parent: pqm at pqm.ubuntu.com-20100926220819-vmtqqvzy94ux6f0z
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 2.2.2-dev
timestamp: Mon 2010-09-27 09:24:54 +0200
message:
  Merge lp:bzr/2.1 into 2.2 resolving conflicts
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/tests/__init__.py       selftest.py-20050531073622-8d0e3c8845c97a64
  bzrlib/tests/features.py       features.py-20090820042958-jglgza3wrn03ha9e-1
  bzrlib/tests/per_lock/test_lock.py test_lock.py-20070313190612-mfpoa7t8kvrgrhj2-1
  bzrlib/tests/test_lockdir.py   test_lockdir.py-20060220222025-33d4221569a3d600
  bzrlib/tests/test_osutils.py   test_osutils.py-20051201224856-e48ee24c12182989
  bzrlib/tests/test_selftest.py  test_selftest.py-20051202044319-c110a115d8c0456a
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS	2010-09-23 02:56:19 +0000
+++ b/NEWS	2010-09-27 07:24:54 +0000
@@ -1187,6 +1187,43 @@
   happens, and another warning will be written if the log file could not
   be closed after retrying 100 times.  (Andrew Bennetts, #531746)
 
+bzr 2.1.4
+#########
+
+:2.1.4: NOT RELEASED YET
+
+Compatibility Breaks
+********************
+
+New Features
+************
+
+Bug Fixes
+*********
+
+* Skip tests that needs a bzr source tree when there isn't one. This is
+  needed to succesfully run the test suite for installed versions.
+  (Vincent Ladeuil, #644855).
+
+* Skip the tests that requires respecting the chmod bits when running as root.
+  (Vincent Ladeuil, #646133)
+
+Improvements
+************
+
+Documentation
+*************
+
+API Changes
+***********
+
+Internals
+*********
+
+Testing
+*******
+
+
 bzr 2.1.3
 #########
 
@@ -1269,6 +1306,86 @@
 * ``build_tree_contents`` can create symlinks.
   (Martin Pool, John Arbash Meinel)
 
+
+bzr 2.0.6
+#########
+
+:2.0.6: 2010-09-17
+
+The sixth release in our 2.0 series addresses several user-inconvenience
+bugs.  None are critical, but upgrading is recommended for all users on
+earlier 2.0 releases.
+
+Bug Fixes
+*********
+
+* Additional merges after an unrelated branch has been merged with its
+  history no longer crash when deleted files are involved.
+  (Vincent Ladeuil, John Arbash Meinel, #375898)
+
+* ``bzr add SYMLINK/FILE`` now works properly when the symlink points to a
+  previously-unversioned directory within the tree: the directory is
+  marked versioned too.  
+  (Martin Pool, #192859)
+
+* ``bzr commit SYMLINK`` now works, rather than trying to commit the
+  target of the symlink.
+  (Martin Pool, John Arbash Meinel, #128562)
+
+* ``bzr revert`` now only takes write lock on working tree, instead of on 
+  both working tree and branch.
+  (Danny van Heumen, #498409)
+
+* ``bzr upgrade`` now creates the ``backup.bzr`` directory with the same
+  permissions as ``.bzr`` directory on a POSIX OS.
+  (Parth Malwankar, #262450)
+
+* Don't traceback trying to unversion children files of an already
+  unversioned directory.  (Vincent Ladeuil, #494221)
+
+* Don't traceback when a lockdir's ``held/info`` file is corrupt (e.g.
+  contains only NUL bytes).  Instead warn the user, and allow ``bzr
+  break-lock`` to remove it.  (Andrew Bennetts, #619872)
+  
+* Fix ``AttributeError on parent.children`` when adding a file under a 
+  directory that was a symlink in the previous commit.
+  (Martin Pool, #192859)
+
+* Prevent ``CHKMap.apply_delta`` from generating non-canonical CHK maps,
+  which can result in "missing referenced chk root keys" errors when
+  fetching from repositories with affected revisions.
+  (Andrew Bennetts, #522637)
+
+* Raise ValueError instead of a string exception.
+  (John Arbash Meinel, #586926)
+
+* Reduce peak memory by one copy of compressed text.
+  (John Arbash Meinel, #566940)
+
+* Repositories accessed via a smart server now reject being stacked on a
+  repository in an incompatible format, as is the case when accessing them
+  via other methods.  This was causing fetches from those repositories via
+  a smart server (e.g. using ``bzr branch``) to receive invalid data.
+  (Andrew Bennetts, #562380)
+
+* Selftest with versions of subunit that support ``stopTestRun`` will no longer
+  error. This error was caused by 2.0 not being updated when upstream
+  python merged the end of run patch, which chose ``stopTestRun`` rather than
+  ``done``. (Robert Collins, #571437)
+
+* When passing a file to ``UTF8DirReader`` make sure to close the current
+  directory file handle after the chdir fails. Otherwise when passing many
+  filenames into a command line ``bzr status`` we would leak descriptors.
+  (John Arbash Meinel, #583486)
+
+
+Testing
+*******
+
+* ``build_tree_contents`` can create symlinks.
+  (Martin Pool, John Arbash Meinel)
+
+
 bzr 2.1.2
 #########
 
@@ -1744,85 +1861,6 @@
   tests that 'failed' - they're all just failures.
   (Martin Pool)
 
-bzr 2.0.6
-#########
-
-:2.0.6: 2010-09-17
-
-The sixth release in our 2.0 series addresses several user-inconvenience
-bugs.  None are critical, but upgrading is recommended for all users on
-earlier 2.0 releases.
-
-Bug Fixes
-*********
-
-* Additional merges after an unrelated branch has been merged with its
-  history no longer crash when deleted files are involved.
-  (Vincent Ladeuil, John Arbash Meinel, #375898)
-
-* ``bzr add SYMLINK/FILE`` now works properly when the symlink points to a
-  previously-unversioned directory within the tree: the directory is
-  marked versioned too.  
-  (Martin Pool, #192859)
-
-* ``bzr commit SYMLINK`` now works, rather than trying to commit the
-  target of the symlink.
-  (Martin Pool, John Arbash Meinel, #128562)
-
-* ``bzr revert`` now only takes write lock on working tree, instead of on 
-  both working tree and branch.
-  (Danny van Heumen, #498409)
-
-* ``bzr upgrade`` now creates the ``backup.bzr`` directory with the same
-  permissions as ``.bzr`` directory on a POSIX OS.
-  (Parth Malwankar, #262450)
-
-* Don't traceback trying to unversion children files of an already
-  unversioned directory.  (Vincent Ladeuil, #494221)
-
-* Don't traceback when a lockdir's ``held/info`` file is corrupt (e.g.
-  contains only NUL bytes).  Instead warn the user, and allow ``bzr
-  break-lock`` to remove it.  (Andrew Bennetts, #619872)
-  
-* Fix ``AttributeError on parent.children`` when adding a file under a 
-  directory that was a symlink in the previous commit.
-  (Martin Pool, #192859)
-
-* Prevent ``CHKMap.apply_delta`` from generating non-canonical CHK maps,
-  which can result in "missing referenced chk root keys" errors when
-  fetching from repositories with affected revisions.
-  (Andrew Bennetts, #522637)
-
-* Raise ValueError instead of a string exception.
-  (John Arbash Meinel, #586926)
-
-* Reduce peak memory by one copy of compressed text.
-  (John Arbash Meinel, #566940)
-
-* Repositories accessed via a smart server now reject being stacked on a
-  repository in an incompatible format, as is the case when accessing them
-  via other methods.  This was causing fetches from those repositories via
-  a smart server (e.g. using ``bzr branch``) to receive invalid data.
-  (Andrew Bennetts, #562380)
-
-* Selftest with versions of subunit that support ``stopTestRun`` will no longer
-  error. This error was caused by 2.0 not being updated when upstream
-  python merged the end of run patch, which chose ``stopTestRun`` rather than
-  ``done``. (Robert Collins, #571437)
-
-* When passing a file to ``UTF8DirReader`` make sure to close the current
-  directory file handle after the chdir fails. Otherwise when passing many
-  filenames into a command line ``bzr status`` we would leak descriptors.
-  (John Arbash Meinel, #583486)
-
-
-Testing
-*******
-
-* ``build_tree_contents`` can create symlinks.
-  (Martin Pool, John Arbash Meinel)
-
-
 bzr 2.0.5
 #########
 

=== modified file 'bzrlib/tests/__init__.py'
--- a/bzrlib/tests/__init__.py	2010-09-17 05:23:20 +0000
+++ b/bzrlib/tests/__init__.py	2010-09-27 07:24:54 +0000
@@ -971,7 +971,7 @@
             try:
                 workingtree.WorkingTree.open(path)
             except (errors.NotBranchError, errors.NoWorkingTree):
-                return
+                raise TestSkipped('Needs a working tree of bzr sources')
         finally:
             self.enable_directory_isolation()
 

=== modified file 'bzrlib/tests/features.py'
--- a/bzrlib/tests/features.py	2010-05-25 21:30:52 +0000
+++ b/bzrlib/tests/features.py	2010-09-27 07:24:54 +0000
@@ -23,6 +23,21 @@
 from bzrlib.symbol_versioning import deprecated_in
 
 
+class _NotRunningAsRoot(tests.Feature):
+
+    def _probe(self):
+        try:
+            uid = os.getuid()
+        except AttributeError:
+            # If there is no uid, chances are there is no root either
+            return True
+        return uid != 0
+
+    def feature_name(self):
+        return 'Not running as root'
+
+
+not_running_as_root = _NotRunningAsRoot()
 apport = tests.ModuleAvailableFeature('apport')
 paramiko = tests.ModuleAvailableFeature('paramiko')
 pycurl = tests.ModuleAvailableFeature('pycurl')

=== modified file 'bzrlib/tests/per_lock/test_lock.py'
--- a/bzrlib/tests/per_lock/test_lock.py	2009-07-07 09:00:59 +0000
+++ b/bzrlib/tests/per_lock/test_lock.py	2010-09-23 16:37:27 +0000
@@ -21,7 +21,7 @@
     osutils,
     )
 
-from bzrlib.tests import UnicodeFilenameFeature
+from bzrlib.tests import (features, UnicodeFilenameFeature)
 from bzrlib.tests.per_lock import TestCaseWithLock
 
 
@@ -63,6 +63,7 @@
 
         But we shouldn't be able to take a write lock.
         """
+        self.requireFeature(features.not_running_as_root)
         osutils.make_readonly('a-file')
         # Make sure the file is read-only (on all platforms)
         self.assertRaises(IOError, open, 'a-file', 'rb+')

=== modified file 'bzrlib/tests/test_lockdir.py'
--- a/bzrlib/tests/test_lockdir.py	2010-09-13 02:32:44 +0000
+++ b/bzrlib/tests/test_lockdir.py	2010-09-27 07:24:54 +0000
@@ -39,7 +39,7 @@
     LockNotHeld,
     )
 from bzrlib.lockdir import LockDir
-from bzrlib.tests import TestCaseWithTransport
+from bzrlib.tests import (features, TestCaseWithTransport)
 from bzrlib.trace import note
 
 # These tests sometimes use threads to test the behaviour of lock files with
@@ -667,6 +667,7 @@
         ld1.unlock()
 
     def test_lock_permission(self):
+        self.requireFeature(features.not_running_as_root)
         if not osutils.supports_posix_readonly():
             raise tests.TestSkipped('Cannot induce a permission failure')
         ld1 = self.get_lock()

=== modified file 'bzrlib/tests/test_osutils.py'
--- a/bzrlib/tests/test_osutils.py	2010-09-23 02:56:19 +0000
+++ b/bzrlib/tests/test_osutils.py	2010-09-27 07:24:54 +0000
@@ -1071,6 +1071,7 @@
         if sys.platform == 'win32':
             raise tests.TestNotApplicable(
                 "readdir IOError not tested on win32")
+        self.requireFeature(features.not_running_as_root)
         os.mkdir("test-unreadable")
         os.chmod("test-unreadable", 0000)
         # must chmod it back so that it can be removed

=== modified file 'bzrlib/tests/test_selftest.py'
--- a/bzrlib/tests/test_selftest.py	2010-09-16 07:12:32 +0000
+++ b/bzrlib/tests/test_selftest.py	2010-09-27 07:24:54 +0000
@@ -613,11 +613,11 @@
         result = test.run()
         total_failures = result.errors + result.failures
         if self._lock_check_thorough:
-            self.assertLength(1, total_failures)
+            self.assertEqual(1, len(total_failures))
         else:
             # When _lock_check_thorough is disabled, then we don't trigger a
             # failure
-            self.assertLength(0, total_failures)
+            self.assertEqual(0, len(total_failures))
 
 
 class TestTestCaseWithTransport(tests.TestCaseWithTransport):



More information about the bazaar-commits mailing list