Rev 3625: (jam) Bring 1.6rc2 back into bzr.dev, and fix up NEWS entries. in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Thu Aug 14 00:25:47 BST 2008


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

------------------------------------------------------------
revno: 3625
revision-id: pqm at pqm.ubuntu.com-20080813232540-mgtcd9chtkd9kda0
parent: pqm at pqm.ubuntu.com-20080813064214-jc5n4sj20j81qcwy
parent: john at arbash-meinel.com-20080813225155-t914z2fqyi072dd4
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2008-08-14 00:25:40 +0100
message:
  (jam) Bring 1.6rc2 back into bzr.dev, and fix up NEWS entries.
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/osutils.py              osutils.py-20050309040759-eeaff12fbf77ac86
  bzrlib/repofmt/pack_repo.py    pack_repo.py-20070813041115-gjv5ma7ktfqwsjgn-1
  bzrlib/transform.py            transform.py-20060105172343-dd99e54394d91687
    ------------------------------------------------------------
    revno: 3624.1.1
    revision-id: john at arbash-meinel.com-20080813225155-t914z2fqyi072dd4
    parent: pqm at pqm.ubuntu.com-20080813064214-jc5n4sj20j81qcwy
    parent: pqm at pqm.ubuntu.com-20080813185456-kn2cq6pkj6h52z9k
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: jam-integration
    timestamp: Wed 2008-08-13 17:51:55 -0500
    message:
      Bring in 1.6rc2, and update NEWS.
      
      Some things that were IN DEVELOPMENT were released in bzr 1.6rc2.
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/osutils.py              osutils.py-20050309040759-eeaff12fbf77ac86
      bzrlib/repofmt/pack_repo.py    pack_repo.py-20070813041115-gjv5ma7ktfqwsjgn-1
      bzrlib/transform.py            transform.py-20060105172343-dd99e54394d91687
    ------------------------------------------------------------
    revno: 3606.2.4
    revision-id: pqm at pqm.ubuntu.com-20080813185456-kn2cq6pkj6h52z9k
    parent: pqm at pqm.ubuntu.com-20080813171514-ukw1ll8hhtge74z8
    parent: john at arbash-meinel.com-20080813182409-gdaw15ylafacc173
    committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
    branch nick: 1.6
    timestamp: Wed 2008-08-13 19:54:56 +0100
    message:
      (jam) Fix handling of ENOTDIR for win32,
      	and prepare the 1.6rc2 release.
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzr                            bzr.py-20050313053754-5485f144c7006fa6
      bzrlib/__init__.py             __init__.py-20050309040759-33e65acf91bbcd5d
      bzrlib/osutils.py              osutils.py-20050309040759-eeaff12fbf77ac86
      bzrlib/transform.py            transform.py-20060105172343-dd99e54394d91687
        ------------------------------------------------------------
        revno: 3596.2.6
        revision-id: john at arbash-meinel.com-20080813182409-gdaw15ylafacc173
        parent: john at arbash-meinel.com-20080813173534-0kb0kr70q505ihph
        committer: John Arbash Meinel <john at arbash-meinel.com>
        branch nick: win32_enotdir
        timestamp: Wed 2008-08-13 13:24:09 -0500
        message:
          Turns out that osutils wasn't imported directly into transform
        modified:
          bzrlib/transform.py            transform.py-20060105172343-dd99e54394d91687
        ------------------------------------------------------------
        revno: 3596.2.5
        revision-id: john at arbash-meinel.com-20080813173534-0kb0kr70q505ihph
        parent: john at arbash-meinel.com-20080813173115-mj34cv2uoxrnw32n
        committer: John Arbash Meinel <john at arbash-meinel.com>
        branch nick: win32_enotdir
        timestamp: Wed 2008-08-13 12:35:34 -0500
        message:
          Fix up NEWS and version info to prepare 1.6rc2
        modified:
          NEWS                           NEWS-20050323055033-4e00b5db738777ff
          bzr                            bzr.py-20050313053754-5485f144c7006fa6
          bzrlib/__init__.py             __init__.py-20050309040759-33e65acf91bbcd5d
        ------------------------------------------------------------
        revno: 3596.2.4
        revision-id: john at arbash-meinel.com-20080813173115-mj34cv2uoxrnw32n
        parent: john at arbash-meinel.com-20080813172516-mlg6z6anklyrq21j
        committer: John Arbash Meinel <john at arbash-meinel.com>
        branch nick: win32_enotdir
        timestamp: Wed 2008-08-13 12:31:15 -0500
        message:
          NEWS entries for the various bugfixes merged
        modified:
          NEWS                           NEWS-20050323055033-4e00b5db738777ff
        ------------------------------------------------------------
        revno: 3596.2.3
        revision-id: john at arbash-meinel.com-20080813172516-mlg6z6anklyrq21j
        parent: john at arbash-meinel.com-20080813160710-ns4og8r4y6xcmp0b
        parent: pqm at pqm.ubuntu.com-20080813171514-ukw1ll8hhtge74z8
        committer: John Arbash Meinel <john at arbash-meinel.com>
        branch nick: win32_enotdir
        timestamp: Wed 2008-08-13 12:25:16 -0500
        message:
          Merge in 1.6 tip
        added:
          bzrlib/tests/test_pack_repository.py test_pack_repository-20080801043947-eaw0e6h2gu75kwmy-1
          bzrlib/tests/test_upgrade_stacked.py test_upgrade_stacked-20080804072225-jd13yami19nskns5-1
        modified:
          NEWS                           NEWS-20050323055033-4e00b5db738777ff
          bzr                            bzr.py-20050313053754-5485f144c7006fa6
          bzrlib/__init__.py             __init__.py-20050309040759-33e65acf91bbcd5d
          bzrlib/annotate.py             annotate.py-20050922133147-7c60541d2614f022
          bzrlib/builtins.py             builtins.py-20050830033751-fc01482b9ca23183
          bzrlib/bzrdir.py               bzrdir.py-20060131065624-156dfea39c4387cb
          bzrlib/commit.py               commit.py-20050511101309-79ec1a0168e0e825
          bzrlib/errors.py               errors.py-20050309040759-20512168c4e14fbd
          bzrlib/inventory.py            inventory.py-20050309040759-6648b84ca2005b37
          bzrlib/knit.py                 knit.py-20051212171256-f056ac8f0fbe1bd9
          bzrlib/repofmt/pack_repo.py    pack_repo.py-20070813041115-gjv5ma7ktfqwsjgn-1
          bzrlib/repository.py           rev_storage.py-20051111201905-119e9401e46257e3
          bzrlib/tests/__init__.py       selftest.py-20050531073622-8d0e3c8845c97a64
          bzrlib/tests/blackbox/test_commit.py test_commit.py-20060212094538-ae88fc861d969db0
          bzrlib/tests/branch_implementations/test_stacking.py test_stacking.py-20080214020755-msjlkb7urobwly0f-1
          bzrlib/tests/inventory_implementations/basics.py basics.py-20070903044446-kdjwbiu1p1zi9phs-1
          bzrlib/tests/test_annotate.py  test_annotate.py-20061213215015-sttc9agsxomls7q0-1
          bzrlib/tests/test_bzrdir.py    test_bzrdir.py-20060131065654-deba40eef51cf220
          bzrlib/tests/test_options.py   testoptions.py-20051014093702-96457cfc86319a8f
          bzrlib/tests/test_repository.py test_repository.py-20060131075918-65c555b881612f4d
          bzrlib/tests/test_transform.py test_transaction.py-20060105172520-b3ffb3946550e6c4
          bzrlib/tests/test_tree.py      test_tree.py-20060724065232-khgrr0vvmt6ih0mi-1
          bzrlib/tests/test_tsort.py     testtsort.py-20051025073946-27da871c394d5be4
          bzrlib/tests/workingtree_implementations/test_commit.py test_commit.py-20060421013633-1610ec2331c8190f
          bzrlib/transform.py            transform.py-20060105172343-dd99e54394d91687
          bzrlib/transport/remote.py     ssh.py-20060608202016-c25gvf1ob7ypbus6-1
          bzrlib/transport/sftp.py       sftp.py-20051019050329-ab48ce71b7e32dfe
          bzrlib/tree.py                 tree.py-20050309040759-9d5f2496be663e77
          bzrlib/tsort.py                tsort.py-20051025073946-7808f6aaf7d07208
          bzrlib/upgrade.py              history2weaves.py-20050818063535-e7d319791c19a8b2
        ------------------------------------------------------------
        revno: 3596.2.2
        revision-id: john at arbash-meinel.com-20080813160710-ns4og8r4y6xcmp0b
        parent: mhammond at skippinet.com.au-20080809050006-5sf16g2b7eijnkwz
        committer: John Arbash Meinel <john at arbash-meinel.com>
        branch nick: jam-integration
        timestamp: Wed 2008-08-13 11:07:10 -0500
        message:
          Factor out the common exception handling looking for ENOTDIR and use it
          for osutils.walkdirs() and tree transform code.
        modified:
          bzrlib/osutils.py              osutils.py-20050309040759-eeaff12fbf77ac86
          bzrlib/transform.py            transform.py-20060105172343-dd99e54394d91687
        ------------------------------------------------------------
        revno: 3596.2.1
        revision-id: mhammond at skippinet.com.au-20080809050006-5sf16g2b7eijnkwz
        parent: pqm at pqm.ubuntu.com-20080730213059-hcremsawwvcqjcj1
        committer: Mark Hammond <mhammond at skippinet.com.au>
        branch nick: bzr.work.tests
        timestamp: Sat 2008-08-09 15:00:06 +1000
        message:
          Correctly catch and handle os.listdir errors on Windows
        modified:
          bzrlib/osutils.py              osutils.py-20050309040759-eeaff12fbf77ac86
          bzrlib/transform.py            transform.py-20060105172343-dd99e54394d91687
    ------------------------------------------------------------
    revno: 3606.2.3
    revision-id: pqm at pqm.ubuntu.com-20080813171514-ukw1ll8hhtge74z8
    parent: pqm at pqm.ubuntu.com-20080813150626-htj2l5by2vy2uol1
    parent: aaron at aaronbentley.com-20080813140357-w4n79too1x2c749k
    committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
    branch nick: 1.6
    timestamp: Wed 2008-08-13 18:15:14 +0100
    message:
      (Aaron Bentley) Update repo format strings
    modified:
      bzrlib/repofmt/pack_repo.py    pack_repo.py-20070813041115-gjv5ma7ktfqwsjgn-1
        ------------------------------------------------------------
        revno: 3606.3.1
        revision-id: aaron at aaronbentley.com-20080813140357-w4n79too1x2c749k
        parent: pqm at pqm.ubuntu.com-20080806081305-xvxw50wzvr47315q
        committer: Aaron Bentley <aaron at aaronbentley.com>
        branch nick: bzr.1.6
        timestamp: Wed 2008-08-13 10:03:57 -0400
        message:
          Update repo format strings
        modified:
          bzrlib/repofmt/pack_repo.py    pack_repo.py-20070813041115-gjv5ma7ktfqwsjgn-1
    ------------------------------------------------------------
    revno: 3606.2.2
    revision-id: pqm at pqm.ubuntu.com-20080813150626-htj2l5by2vy2uol1
    parent: pqm at pqm.ubuntu.com-20080806081305-xvxw50wzvr47315q
    parent: jelmer at samba.org-20080809004530-v2g6mrvl4bc1tae1
    committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
    branch nick: 1.6
    timestamp: Wed 2008-08-13 16:06:26 +0100
    message:
      (Jelmer) Fix a smal bug in Inventory.copy()
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzr                            bzr.py-20050313053754-5485f144c7006fa6
      bzrlib/__init__.py             __init__.py-20050309040759-33e65acf91bbcd5d
      bzrlib/annotate.py             annotate.py-20050922133147-7c60541d2614f022
      bzrlib/builtins.py             builtins.py-20050830033751-fc01482b9ca23183
      bzrlib/inventory.py            inventory.py-20050309040759-6648b84ca2005b37
      bzrlib/repofmt/pack_repo.py    pack_repo.py-20070813041115-gjv5ma7ktfqwsjgn-1
      bzrlib/tests/inventory_implementations/basics.py basics.py-20070903044446-kdjwbiu1p1zi9phs-1
      bzrlib/tests/test_annotate.py  test_annotate.py-20061213215015-sttc9agsxomls7q0-1
      bzrlib/tests/test_transform.py test_transaction.py-20060105172520-b3ffb3946550e6c4
      bzrlib/tests/test_tsort.py     testtsort.py-20051025073946-27da871c394d5be4
      bzrlib/transform.py            transform.py-20060105172343-dd99e54394d91687
      bzrlib/transport/remote.py     ssh.py-20060608202016-c25gvf1ob7ypbus6-1
      bzrlib/transport/sftp.py       sftp.py-20051019050329-ab48ce71b7e32dfe
      bzrlib/tsort.py                tsort.py-20051025073946-7808f6aaf7d07208
      bzrlib/upgrade.py              history2weaves.py-20050818063535-e7d319791c19a8b2
=== modified file 'NEWS'
--- a/NEWS	2008-08-13 02:13:01 +0000
+++ b/NEWS	2008-08-13 22:51:55 +0000
@@ -11,6 +11,28 @@
 
   IMPROVEMENTS:
 
+  BUG FIXES:
+
+  API CHANGES:
+
+    * Exporters now take 4 parameters. (Robert Collins)
+
+  TESTING:
+
+    * ``addCleanup`` now takes ``*arguments`` and ``**keyword_arguments``
+      which are then passed to the cleanup callable as it is run. In
+      addition, addCleanup no longer requires that the callables passed to
+      it be unique. (Jonathan Lange)
+
+  INTERNALS:
+
+
+bzr 1.6rc2 2008-08-13
+---------------------
+
+This release candidate has a few minor bug fixes, and some regression
+fixes for Windows.
+
     * ``bzr export`` can now export a subdirectory of a project.
       (Robert Collins)
 
@@ -19,6 +41,19 @@
     * ``bzr upgrade`` on remote branches accessed via bzr:// and
       bzr+ssh:// now works.  (Andrew Bennetts)
 
+    * Change the ``get_format_description()`` strings for
+      ``RepositoryFormatKnitPack5`` et al to be single line messages.
+      (Aaron Bentley)
+
+    * Fix for a regression on Win32 where we would try to call
+      ``os.listdir()`` on a file and not catch the exception properly.
+      (Windows raises a different exception.) This would manifest in
+      places like ``bzr rm file`` or ``bzr switch``.
+      (Mark Hammond, John Arbash Meinel)
+
+    * ``Inventory.copy()`` was failing to set the revision property for
+      the root entry. (Jelmer Vernooij)
+
     * sftp transport: added missing ``FileExists`` case to
       ``_translate_io_exception`` (Christophe Troestler, #123475)
 
@@ -32,19 +67,6 @@
       choice is arbitrary but stable, so merges in different directions
       will get the same results.  (John Arbash Meinel, #232188)
 
-  API CHANGES:
-
-    * Exporters now take 4 parameters. (Robert Collins)
-
-  TESTING:
-
-    * ``addCleanup`` now takes ``*arguments`` and ``**keyword_arguments``
-      which are then passed to the cleanup callable as it is run. In
-      addition, addCleanup no longer requires that the callables passed to
-      it be unique. (Jonathan Lange)
-
-  INTERNALS:
-
 
 bzr 1.6rc1 2008-08-06
 ---------------------
@@ -60,7 +82,7 @@
     * Knit format repositories are deprecated and bzr will now emit
       warnings whenever it encounters one.  Use ``bzr upgrade`` to upgrade
       knit repositories to pack format.  (Andrew Bennetts)
-      
+
   IMPROVEMENTS:
 
     * ``bzr check`` can now be told which elements at a location it should

=== modified file 'bzrlib/osutils.py'
--- a/bzrlib/osutils.py	2008-07-30 09:50:22 +0000
+++ b/bzrlib/osutils.py	2008-08-13 16:07:10 +0000
@@ -1119,6 +1119,34 @@
         raise errors.IllegalPath(path)
 
 
+_WIN32_ERROR_DIRECTORY = 267 # Similar to errno.ENOTDIR
+
+def _is_error_enotdir(e):
+    """Check if this exception represents ENOTDIR.
+
+    Unfortunately, python is very inconsistent about the exception
+    here. The cases are:
+      1) Linux, Mac OSX all versions seem to set errno == ENOTDIR
+      2) Windows, Python2.4, uses errno == ERROR_DIRECTORY (267)
+         which is the windows error code.
+      3) Windows, Python2.5 uses errno == EINVAL and
+         winerror == ERROR_DIRECTORY
+
+    :param e: An Exception object (expected to be OSError with an errno
+        attribute, but we should be able to cope with anything)
+    :return: True if this represents an ENOTDIR error. False otherwise.
+    """
+    en = getattr(e, 'errno', None)
+    if (en == errno.ENOTDIR
+        or (sys.platform == 'win32'
+            and (en == _WIN32_ERROR_DIRECTORY
+                 or (en == errno.EINVAL
+                     and getattr(e, 'winerror', None) == _WIN32_ERROR_DIRECTORY)
+        ))):
+        return True
+    return False
+
+
 def walkdirs(top, prefix=""):
     """Yield data about all the directories in a tree.
     
@@ -1171,10 +1199,7 @@
         try:
             names = sorted(_listdir(top))
         except OSError, e:
-            if getattr(e, 'errno', None) == errno.ENOTDIR:
-                # We have been asked to examine a file, this is fine.
-                pass
-            else:
+            if not _is_error_enotdir(e):
                 raise
         else:
             for name in names:

=== modified file 'bzrlib/repofmt/pack_repo.py'
--- a/bzrlib/repofmt/pack_repo.py	2008-08-05 14:35:14 +0000
+++ b/bzrlib/repofmt/pack_repo.py	2008-08-13 17:15:14 +0000
@@ -2079,14 +2079,14 @@
 
     def get_format_description(self):
         """See RepositoryFormat.get_format_description()."""
-        return self.__doc__
+        return "Packs 5 (adds stacking support, requires bzr 1.6)"
 
     def check_conversion_target(self, target_format):
         pass
 
 
 class RepositoryFormatKnitPack5RichRoot(RepositoryFormatPack):
-    """A repository with subtrees and external references.
+    """A repository with rich roots and external references.
 
     New in release 1.6.
 
@@ -2121,8 +2121,7 @@
         return "Bazaar RepositoryFormatKnitPack5RichRoot (bzr 1.6)\n"
 
     def get_format_description(self):
-        """See RepositoryFormat.get_format_description()."""
-        return self.__doc__
+        return "Packs 5 rich-root (adds stacking support, requires bzr 1.6)"
 
 
 class RepositoryFormatPackDevelopment0(RepositoryFormatPack):

=== modified file 'bzrlib/transform.py'
--- a/bzrlib/transform.py	2008-08-12 14:19:23 +0000
+++ b/bzrlib/transform.py	2008-08-13 22:51:55 +0000
@@ -27,6 +27,7 @@
     delta,
     errors,
     inventory,
+    osutils,
     revision as _mod_revision,
     )
 """)
@@ -655,10 +656,11 @@
         try:
             children = os.listdir(self._tree.abspath(path))
         except OSError, e:
-            if e.errno not in (errno.ENOENT, errno.ESRCH, errno.ENOTDIR):
+            if not (osutils._is_error_enotdir(e)
+                    or e.errno in (errno.ENOENT, errno.ESRCH)):
                 raise
             return
-            
+
         for child in children:
             childpath = joinpath(path, child)
             if self._tree.is_control_filename(childpath):




More information about the bazaar-commits mailing list