Rev 3667: (jam) Merge bzr-1.6.1rc1 in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Fri Aug 29 22:40:41 BST 2008


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

------------------------------------------------------------
revno: 3667
revision-id: pqm at pqm.ubuntu.com-20080829214033-n9tclw44g7b42hsc
parent: pqm at pqm.ubuntu.com-20080829201726-i807i54i319nfgdn
parent: john at arbash-meinel.com-20080829210816-3io9u83nt12ul2z2
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Fri 2008-08-29 22:40:33 +0100
message:
  (jam) Merge bzr-1.6.1rc1
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/bzrdir.py               bzrdir.py-20060131065624-156dfea39c4387cb
  bzrlib/fetch.py                fetch.py-20050818234941-26fea6105696365d
  bzrlib/repofmt/pack_repo.py    pack_repo.py-20070813041115-gjv5ma7ktfqwsjgn-1
  bzrlib/repository.py           rev_storage.py-20051111201905-119e9401e46257e3
  bzrlib/tests/blackbox/test_info.py test_info.py-20060215045507-bbdd2d34efab9e0a
  bzrlib/tests/test_bzrdir.py    test_bzrdir.py-20060131065654-deba40eef51cf220
  bzrlib/tests/test_fetch.py     testfetch.py-20050825090644-f73e07e7dfb1765a
  bzrlib/tests/test_info.py      test_info.py-20070320150933-m0xxm1g7xi9v6noe-1
  bzrlib/tests/test_pack_repository.py test_pack_repository-20080801043947-eaw0e6h2gu75kwmy-1
  bzrlib/tests/test_upgrade_stacked.py test_upgrade_stacked-20080804072225-jd13yami19nskns5-1
  bzrlib/transport/remote.py     ssh.py-20060608202016-c25gvf1ob7ypbus6-1
    ------------------------------------------------------------
    revno: 3665.2.3
    revision-id: john at arbash-meinel.com-20080829210816-3io9u83nt12ul2z2
    parent: john at arbash-meinel.com-20080829193335-wqvq1tn2j6aksapn
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: jam-integration
    timestamp: Fri 2008-08-29 16:08:16 -0500
    message:
      Fix a test that was expected to fail.
      It doesn't anymore because 1.6.1-rich-root can stack on a
      rich-root-pack.
    modified:
      bzrlib/tests/test_bzrdir.py    test_bzrdir.py-20060131065654-deba40eef51cf220
    ------------------------------------------------------------
    revno: 3665.2.2
    revision-id: john at arbash-meinel.com-20080829193335-wqvq1tn2j6aksapn
    parent: john at arbash-meinel.com-20080829193200-wdvz1vr3sgga1tp9
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: jam-integration
    timestamp: Fri 2008-08-29 14:33:35 -0500
    message:
      Remove that dreaded comment again
    modified:
      bzrlib/transport/remote.py     ssh.py-20060608202016-c25gvf1ob7ypbus6-1
    ------------------------------------------------------------
    revno: 3665.2.1
    revision-id: john at arbash-meinel.com-20080829193200-wdvz1vr3sgga1tp9
    parent: pqm at pqm.ubuntu.com-20080829062746-ny482m2f2pukdhqt
    parent: pqm at pqm.ubuntu.com-20080829171523-uocf850tnc8xz6qk
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: jam-integration
    timestamp: Fri 2008-08-29 14:32:00 -0500
    message:
      Merge in 1.6.1rc1
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/bzrdir.py               bzrdir.py-20060131065624-156dfea39c4387cb
      bzrlib/fetch.py                fetch.py-20050818234941-26fea6105696365d
      bzrlib/repofmt/pack_repo.py    pack_repo.py-20070813041115-gjv5ma7ktfqwsjgn-1
      bzrlib/repository.py           rev_storage.py-20051111201905-119e9401e46257e3
      bzrlib/tests/blackbox/test_info.py test_info.py-20060215045507-bbdd2d34efab9e0a
      bzrlib/tests/test_fetch.py     testfetch.py-20050825090644-f73e07e7dfb1765a
      bzrlib/tests/test_info.py      test_info.py-20070320150933-m0xxm1g7xi9v6noe-1
      bzrlib/tests/test_pack_repository.py test_pack_repository-20080801043947-eaw0e6h2gu75kwmy-1
      bzrlib/tests/test_upgrade_stacked.py test_upgrade_stacked-20080804072225-jd13yami19nskns5-1
    ------------------------------------------------------------
    revno: 3606.5.14
    revision-id: pqm at pqm.ubuntu.com-20080829171523-uocf850tnc8xz6qk
    parent: pqm at pqm.ubuntu.com-20080829154106-r31zywifs7jfueys
    parent: john at arbash-meinel.com-20080829163911-ckm9kugdug9dcmct
    committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
    branch nick: 1.6
    timestamp: Fri 2008-08-29 18:15:23 +0100
    message:
      (jam) Prepare the 1.6.1rc1 release
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzr                            bzr.py-20050313053754-5485f144c7006fa6
      bzrlib/__init__.py             __init__.py-20050309040759-33e65acf91bbcd5d
        ------------------------------------------------------------
        revno: 3606.13.3
        revision-id: john at arbash-meinel.com-20080829163911-ckm9kugdug9dcmct
        parent: john at arbash-meinel.com-20080829153030-wnxb2c1f11nlhypj
        committer: John Arbash Meinel <john at arbash-meinel.com>
        branch nick: 1.6.1rc1
        timestamp: Fri 2008-08-29 11:39:11 -0500
        message:
          Update the script version as well
        modified:
          bzr                            bzr.py-20050313053754-5485f144c7006fa6
        ------------------------------------------------------------
        revno: 3606.13.2
        revision-id: john at arbash-meinel.com-20080829153030-wnxb2c1f11nlhypj
        parent: john at arbash-meinel.com-20080829152846-ovn10w0oe5i9rzuv
        committer: John Arbash Meinel <john at arbash-meinel.com>
        branch nick: 1.6.1rc1
        timestamp: Fri 2008-08-29 10:30:30 -0500
        message:
          Update the version string
        modified:
          bzrlib/__init__.py             __init__.py-20050309040759-33e65acf91bbcd5d
        ------------------------------------------------------------
        revno: 3606.13.1
        revision-id: john at arbash-meinel.com-20080829152846-ovn10w0oe5i9rzuv
        parent: pqm at pqm.ubuntu.com-20080829125554-6it3dn33ne5lq7xc
        committer: John Arbash Meinel <john at arbash-meinel.com>
        branch nick: 1.6.1rc1
        timestamp: Fri 2008-08-29 10:28:46 -0500
        message:
          Add the release info for bzr 1.6.1rc1
        modified:
          NEWS                           NEWS-20050323055033-4e00b5db738777ff
    ------------------------------------------------------------
    revno: 3606.5.13
    revision-id: pqm at pqm.ubuntu.com-20080829154106-r31zywifs7jfueys
    parent: pqm at pqm.ubuntu.com-20080829125554-6it3dn33ne5lq7xc
    parent: john at arbash-meinel.com-20080829151023-drmf96z1lo291bcc
    committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
    branch nick: 1.6
    timestamp: Fri 2008-08-29 16:41:06 +0100
    message:
      (jam) (trivial) clean up an unnecessary comment
    modified:
      bzrlib/transport/remote.py     ssh.py-20060608202016-c25gvf1ob7ypbus6-1
        ------------------------------------------------------------
        revno: 3606.12.3
        revision-id: john at arbash-meinel.com-20080829151023-drmf96z1lo291bcc
        parent: john at arbash-meinel.com-20080829122453-pgvngxegwod5ttdf
        committer: John Arbash Meinel <john at arbash-meinel.com>
        branch nick: hpss_readv
        timestamp: Fri 2008-08-29 10:10:23 -0500
        message:
          (trivial) remove a commented out pdb section
        modified:
          bzrlib/transport/remote.py     ssh.py-20060608202016-c25gvf1ob7ypbus6-1
    ------------------------------------------------------------
    revno: 3606.5.12
    revision-id: pqm at pqm.ubuntu.com-20080829125554-6it3dn33ne5lq7xc
    parent: pqm at pqm.ubuntu.com-20080829065751-5a5hk6l80cg7v5c6
    parent: john at arbash-meinel.com-20080829122453-pgvngxegwod5ttdf
    committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
    branch nick: 1.6
    timestamp: Fri 2008-08-29 13:55:54 +0100
    message:
      (jam) Update HPSS.readv() to do better with the buffer
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/smart/protocol.py       protocol.py-20061108035435-ot0lstk2590yqhzr-1
      bzrlib/tests/test_smart_transport.py test_ssh_transport.py-20060608202016-c25gvf1ob7ypbus6-2
      bzrlib/transport/remote.py     ssh.py-20060608202016-c25gvf1ob7ypbus6-1
        ------------------------------------------------------------
        revno: 3606.12.2
        revision-id: john at arbash-meinel.com-20080829122453-pgvngxegwod5ttdf
        parent: john at arbash-meinel.com-20080829052558-2j75lgu4g571z13f
        parent: pqm at pqm.ubuntu.com-20080829065751-5a5hk6l80cg7v5c6
        committer: John Arbash Meinel <john at arbash-meinel.com>
        branch nick: hpss_readv
        timestamp: Fri 2008-08-29 07:24:53 -0500
        message:
          Merge in bzr.1.6 to get NEWS cleaned up.
        modified:
          NEWS                           NEWS-20050323055033-4e00b5db738777ff
          bzrlib/bzrdir.py               bzrdir.py-20060131065624-156dfea39c4387cb
          bzrlib/fetch.py                fetch.py-20050818234941-26fea6105696365d
          bzrlib/repofmt/pack_repo.py    pack_repo.py-20070813041115-gjv5ma7ktfqwsjgn-1
          bzrlib/repository.py           rev_storage.py-20051111201905-119e9401e46257e3
          bzrlib/tests/blackbox/test_info.py test_info.py-20060215045507-bbdd2d34efab9e0a
          bzrlib/tests/test_fetch.py     testfetch.py-20050825090644-f73e07e7dfb1765a
          bzrlib/tests/test_info.py      test_info.py-20070320150933-m0xxm1g7xi9v6noe-1
          bzrlib/tests/test_pack_repository.py test_pack_repository-20080801043947-eaw0e6h2gu75kwmy-1
          bzrlib/tests/test_upgrade_stacked.py test_upgrade_stacked-20080804072225-jd13yami19nskns5-1
        ------------------------------------------------------------
        revno: 3606.12.1
        revision-id: john at arbash-meinel.com-20080829052558-2j75lgu4g571z13f
        parent: pqm at pqm.ubuntu.com-20080825143827-fl7cocq59pqdig2p
        committer: John Arbash Meinel <john at arbash-meinel.com>
        branch nick: hpss_readv
        timestamp: Fri 2008-08-29 00:25:58 -0500
        message:
          Cherrypick the hpss_readv fix back onto bzr.1.6
        modified:
          NEWS                           NEWS-20050323055033-4e00b5db738777ff
          bzrlib/smart/protocol.py       protocol.py-20061108035435-ot0lstk2590yqhzr-1
          bzrlib/tests/test_smart_transport.py test_ssh_transport.py-20060608202016-c25gvf1ob7ypbus6-2
          bzrlib/transport/remote.py     ssh.py-20060608202016-c25gvf1ob7ypbus6-1
    ------------------------------------------------------------
    revno: 3606.5.11
    revision-id: pqm at pqm.ubuntu.com-20080829065751-5a5hk6l80cg7v5c6
    parent: pqm at pqm.ubuntu.com-20080829055632-1d382i6dsatudrcg
    parent: john at arbash-meinel.com-20080829053033-sr6alv4rzfvlfwke
    committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
    branch nick: 1.6
    timestamp: Fri 2008-08-29 07:57:51 +0100
    message:
      (jam) Fix bug #261339 by always fetching Revision texts as fulltexts.
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/fetch.py                fetch.py-20050818234941-26fea6105696365d
      bzrlib/tests/test_fetch.py     testfetch.py-20050825090644-f73e07e7dfb1765a
        ------------------------------------------------------------
        revno: 3606.11.2
        revision-id: john at arbash-meinel.com-20080829053033-sr6alv4rzfvlfwke
        parent: john at arbash-meinel.com-20080829020522-kpkk0zvxf52oj3kh
        parent: john at arbash-meinel.com-20080829051928-wtobyp0rxuepozmi
        committer: John Arbash Meinel <john at arbash-meinel.com>
        branch nick: bug_261339
        timestamp: Fri 2008-08-29 00:30:33 -0500
        message:
          Merge in rich-root-serializer to get the NEWS entry correct.
        modified:
          NEWS                           NEWS-20050323055033-4e00b5db738777ff
          bzrlib/bzrdir.py               bzrdir.py-20060131065624-156dfea39c4387cb
          bzrlib/repofmt/pack_repo.py    pack_repo.py-20070813041115-gjv5ma7ktfqwsjgn-1
          bzrlib/repository.py           rev_storage.py-20051111201905-119e9401e46257e3
          bzrlib/tests/blackbox/test_info.py test_info.py-20060215045507-bbdd2d34efab9e0a
          bzrlib/tests/test_info.py      test_info.py-20070320150933-m0xxm1g7xi9v6noe-1
          bzrlib/tests/test_pack_repository.py test_pack_repository-20080801043947-eaw0e6h2gu75kwmy-1
          bzrlib/tests/test_upgrade_stacked.py test_upgrade_stacked-20080804072225-jd13yami19nskns5-1
        ------------------------------------------------------------
        revno: 3606.11.1
        revision-id: john at arbash-meinel.com-20080829020522-kpkk0zvxf52oj3kh
        parent: pqm at pqm.ubuntu.com-20080825143827-fl7cocq59pqdig2p
        committer: John Arbash Meinel <john at arbash-meinel.com>
        branch nick: bug_261339
        timestamp: Thu 2008-08-28 21:05:22 -0500
        message:
          Fix bug #261339, Always request full texts for Revision texts.
        modified:
          NEWS                           NEWS-20050323055033-4e00b5db738777ff
          bzrlib/fetch.py                fetch.py-20050818234941-26fea6105696365d
          bzrlib/tests/test_fetch.py     testfetch.py-20050825090644-f73e07e7dfb1765a
    ------------------------------------------------------------
    revno: 3606.5.10
    revision-id: pqm at pqm.ubuntu.com-20080829055632-1d382i6dsatudrcg
    parent: pqm at pqm.ubuntu.com-20080825143827-fl7cocq59pqdig2p
    parent: john at arbash-meinel.com-20080829051928-wtobyp0rxuepozmi
    committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
    branch nick: 1.6
    timestamp: Fri 2008-08-29 06:56:32 +0100
    message:
      (jam) Supersede the --1.6-rich-root format,
      	in favor of --1.6.1-rich-root, which gets the serializer right.
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/bzrdir.py               bzrdir.py-20060131065624-156dfea39c4387cb
      bzrlib/repofmt/pack_repo.py    pack_repo.py-20070813041115-gjv5ma7ktfqwsjgn-1
      bzrlib/repository.py           rev_storage.py-20051111201905-119e9401e46257e3
      bzrlib/tests/blackbox/test_info.py test_info.py-20060215045507-bbdd2d34efab9e0a
      bzrlib/tests/test_info.py      test_info.py-20070320150933-m0xxm1g7xi9v6noe-1
      bzrlib/tests/test_pack_repository.py test_pack_repository-20080801043947-eaw0e6h2gu75kwmy-1
      bzrlib/tests/test_upgrade_stacked.py test_upgrade_stacked-20080804072225-jd13yami19nskns5-1
    ------------------------------------------------------------
    revno: 3606.10.6
    revision-id: john at arbash-meinel.com-20080829051928-wtobyp0rxuepozmi
    parent: john at arbash-meinel.com-20080829051856-cybdbv604adwbzn1
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: rich_root_serializer
    timestamp: Fri 2008-08-29 00:19:28 -0500
    message:
      Cleanup NEWS
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
    ------------------------------------------------------------
    revno: 3606.10.5
    revision-id: john at arbash-meinel.com-20080829051856-cybdbv604adwbzn1
    parent: john at arbash-meinel.com-20080829044612-i5eshappfji5sjfz
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: rich_root_serializer
    timestamp: Fri 2008-08-29 00:18:56 -0500
    message:
      Switch out --1.6-rich-root for --1.6.1-rich-root.
      
      Fix up the tests that were expecting the old name.
      Also add tests that stacking properly check the various
      permutations.
    modified:
      bzrlib/bzrdir.py               bzrdir.py-20060131065624-156dfea39c4387cb
      bzrlib/tests/blackbox/test_info.py test_info.py-20060215045507-bbdd2d34efab9e0a
      bzrlib/tests/test_info.py      test_info.py-20070320150933-m0xxm1g7xi9v6noe-1
      bzrlib/tests/test_pack_repository.py test_pack_repository-20080801043947-eaw0e6h2gu75kwmy-1
      bzrlib/tests/test_upgrade_stacked.py test_upgrade_stacked-20080804072225-jd13yami19nskns5-1
    ------------------------------------------------------------
    revno: 3606.10.4
    revision-id: john at arbash-meinel.com-20080829044612-i5eshappfji5sjfz
    parent: john at arbash-meinel.com-20080829025102-yen21bf2ryskwbrr
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: rich_root_serializer
    timestamp: Thu 2008-08-28 23:46:12 -0500
    message:
      Remove --1.6-rich-root as a registered metadir collection.
    modified:
      bzrlib/bzrdir.py               bzrdir.py-20060131065624-156dfea39c4387cb
    ------------------------------------------------------------
    revno: 3606.10.3
    revision-id: john at arbash-meinel.com-20080829025102-yen21bf2ryskwbrr
    parent: john at arbash-meinel.com-20080829024439-zx2jhwqbt4qlyg13
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: rich_root_serializer
    timestamp: Thu 2008-08-28 21:51:02 -0500
    message:
      When warning give an exact upgrade request.
    modified:
      bzrlib/repofmt/pack_repo.py    pack_repo.py-20070813041115-gjv5ma7ktfqwsjgn-1
    ------------------------------------------------------------
    revno: 3606.10.2
    revision-id: john at arbash-meinel.com-20080829024439-zx2jhwqbt4qlyg13
    parent: john at arbash-meinel.com-20080829023918-10cy13i3x5af62ne
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: rich_root_serializer
    timestamp: Thu 2008-08-28 21:44:39 -0500
    message:
      Name the new format 1.6.1-rich-root, and NEWS for fixing bug #262333
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/bzrdir.py               bzrdir.py-20060131065624-156dfea39c4387cb
      bzrlib/repofmt/pack_repo.py    pack_repo.py-20070813041115-gjv5ma7ktfqwsjgn-1
    ------------------------------------------------------------
    revno: 3606.10.1
    revision-id: john at arbash-meinel.com-20080829023918-10cy13i3x5af62ne
    parent: pqm at pqm.ubuntu.com-20080825143827-fl7cocq59pqdig2p
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: rich_root_serializer
    timestamp: Thu 2008-08-28 21:39:18 -0500
    message:
      Create a new --1.6-rich-root, deprecate the old one.
    modified:
      bzrlib/bzrdir.py               bzrdir.py-20060131065624-156dfea39c4387cb
      bzrlib/repofmt/pack_repo.py    pack_repo.py-20070813041115-gjv5ma7ktfqwsjgn-1
      bzrlib/repository.py           rev_storage.py-20051111201905-119e9401e46257e3
=== modified file 'NEWS'
--- a/NEWS	2008-08-29 06:27:46 +0000
+++ b/NEWS	2008-08-29 19:32:00 +0000
@@ -54,13 +54,6 @@
     * Merging from a previously joined branch will no longer cause 
       a traceback. (Jelmer Vernooij, #203376)
     
-    * ``RemoteTransport.readv()`` was being inefficient about how it
-      buffered the readv data and processed it. It would keep appending to
-      the same string (causing many copies) and then pop bytes out of the
-      start of the string (causing more copies).
-      With this patch "bzr+ssh://local" speeds improve by up to 3x.
-      (John Arbash Meinel)
-
     * Running ``bzr st PATH_TO_TREE`` will no longer suppress merge
       status. Status is also about 7% faster on mozilla sized trees
       when the path to the root of the tree has been given. Users of
@@ -115,6 +108,46 @@
       clients now use this mechanism.  (Neil Martinsen-Burrell)
 
 
+bzr 1.6.1rc1 2008-08-29
+-----------------------
+
+This release fixes a few regressions found in the 1.6 client. Fetching
+changes was using an O(N^2) buffering algorithm, so for large projects it
+would cause memory thrashing. There is also a specific problem with the
+``--1.6-rich-root`` format, which prevented stacking on top of
+``--rich-root-pack`` repositories, and could allow users to accidentally
+fetch experimental data (``-subtree``) without representing it properly.
+The ``--1.6-rich-root`` format has been deprecated and users are
+recommended to upgrade to ``--1.6.1-rich-root`` immediately.  Also we
+re-introduced a workaround for users who have repositories with incorrect
+nodes (not possible if you only used official releases).
+I should also clarify that none of this is data loss level issues, but
+still sufficient enough to warrant an updated release.
+
+  BUG FIXES:
+
+    * ``RemoteTransport.readv()`` was being inefficient about how it
+      buffered the readv data and processed it. It would keep appending to
+      the same string (causing many copies) and then pop bytes out of the
+      start of the string (causing more copies).
+      With this patch "bzr+ssh://local" can improve dramatically,
+      especially for projects with large files.
+      (John Arbash Meinel)
+
+    * Revision texts were always meant to be stored as fulltexts. There
+      was a bug in a bzr.dev version that would accidentally create deltas
+      when copying from a Pack repo to a Knit repo. This has been fixed,
+      but to support those repositories, we know always request full texts
+      for Revision texts. (John Arbash Meinel, #261339)
+
+    * The previous ``--1.6-rich-root`` format used an incorrect xml
+      serializer, which would accidentally support fetching from a
+      repository that supported subtrees, even though the local one would
+      not. We deprecated that format, and introduced a new one that uses
+      the correct serializer ``--1.6.1-rich-root``.
+      (John Arbash Meinel, #262333)
+
+
 bzr 1.6 2008-08-25
 ------------------
 

=== modified file 'bzrlib/bzrdir.py'
--- a/bzrlib/bzrdir.py	2008-08-28 22:04:58 +0000
+++ b/bzrlib/bzrdir.py	2008-08-29 19:32:00 +0000
@@ -3032,7 +3032,7 @@
     branch_format='bzrlib.branch.BzrBranchFormat7',
     tree_format='bzrlib.workingtree.WorkingTreeFormat4',
     )
-format_registry.register_metadir('1.6-rich-root',
+format_registry.register_metadir('1.6.1-rich-root',
     'bzrlib.repofmt.pack_repo.RepositoryFormatKnitPack5RichRoot',
     help='A branch and pack based repository that supports stacking '
          'and rich root data (needed for bzr-svn). ',

=== modified file 'bzrlib/fetch.py'
--- a/bzrlib/fetch.py	2008-08-18 22:34:21 +0000
+++ b/bzrlib/fetch.py	2008-08-29 02:05:22 +0000
@@ -255,7 +255,10 @@
         to_sf.insert_record_stream(filter_absent(from_sf.get_record_stream(
             [(rev_id,) for rev_id in revs],
             self.to_repository._fetch_order,
-            not self.to_repository._fetch_uses_deltas)))
+            True)))
+        # Bug #261339, some knit repositories accidentally had deltas in their
+        # revision stream, when you weren't ever supposed to have deltas.
+        # So we now *force* fulltext copying for signatures and revisions
         self._fetch_just_revision_texts(revs)
 
     def _fetch_just_revision_texts(self, version_ids):
@@ -264,7 +267,10 @@
         to_rf.insert_record_stream(from_rf.get_record_stream(
             [(rev_id,) for rev_id in version_ids],
             self.to_repository._fetch_order,
-            not self.to_repository._fetch_uses_deltas))
+            True))
+        # Bug #261339, some knit repositories accidentally had deltas in their
+        # revision stream, when you weren't ever supposed to have deltas.
+        # So we now *force* fulltext copying for signatures and revisions
 
     def _generate_root_texts(self, revs):
         """This will be called by __fetch between fetching weave texts and
@@ -380,6 +386,8 @@
                                       parents)
 
     def fetch_revisions(self, revision_ids):
+        # TODO: should this batch them up rather than requesting 10,000
+        #       revisions at once?
         for revision in self.source.get_revisions(revision_ids):
             self.target.add_revision(revision.revision_id, revision)
 

=== modified file 'bzrlib/repofmt/pack_repo.py'
--- a/bzrlib/repofmt/pack_repo.py	2008-08-18 22:34:21 +0000
+++ b/bzrlib/repofmt/pack_repo.py	2008-08-29 02:51:02 +0000
@@ -1722,8 +1722,15 @@
         self._fetch_order = 'unordered'
 
     def _warn_if_deprecated(self):
-        # This class isn't deprecated
-        pass
+        # This class isn't deprecated, but one sub-format is
+        if isinstance(self._format, RepositoryFormatKnitPack5RichRootBroken):
+            from bzrlib import repository
+            if repository._deprecation_warning_done:
+                return
+            repository._deprecation_warning_done = True
+            warning("Format %s for %s is deprecated - please use"
+                    " 'bzr upgrade --1.6.1-rich-root'"
+                    % (self._format, self.bzrdir.transport.base))
 
     def _abort_write_group(self):
         self._pack_collection._abort_write_group()
@@ -2086,12 +2093,54 @@
 
 
 class RepositoryFormatKnitPack5RichRoot(RepositoryFormatPack):
+    """A repository with rich roots and stacking.
+
+    New in release 1.6.1.
+
+    Supports stacking on other repositories, allowing data to be accessed
+    without being stored locally.
+    """
+
+    repository_class = KnitPackRepository
+    _commit_builder_class = PackRootCommitBuilder
+    rich_root_data = True
+    supports_tree_reference = False # no subtrees
+    _serializer = xml6.serializer_v6
+    supports_external_lookups = True
+
+    def _get_matching_bzrdir(self):
+        return bzrdir.format_registry.make_bzrdir(
+            '1.6.1-rich-root')
+
+    def _ignore_setting_bzrdir(self, format):
+        pass
+
+    _matchingbzrdir = property(_get_matching_bzrdir, _ignore_setting_bzrdir)
+
+    def check_conversion_target(self, target_format):
+        if not target_format.rich_root_data:
+            raise errors.BadConversionTarget(
+                'Does not support rich root data.', target_format)
+
+    def get_format_string(self):
+        """See RepositoryFormat.get_format_string()."""
+        return "Bazaar RepositoryFormatKnitPack5RichRoot (bzr 1.6.1)\n"
+
+    def get_format_description(self):
+        return "Packs 5 rich-root (adds stacking support, requires bzr 1.6.1)"
+
+
+class RepositoryFormatKnitPack5RichRootBroken(RepositoryFormatPack):
     """A repository with rich roots and external references.
 
     New in release 1.6.
 
     Supports external lookups, which results in non-truncated ghosts after
     reconcile compared to pack-0.92 formats.
+
+    This format was deprecated because the serializer it uses accidentally
+    supported subtrees, when the format was not intended to. This meant that
+    someone could accidentally fetch from an incorrect repository.
     """
 
     repository_class = KnitPackRepository
@@ -2115,13 +2164,14 @@
         if not target_format.rich_root_data:
             raise errors.BadConversionTarget(
                 'Does not support rich root data.', target_format)
-            
+
     def get_format_string(self):
         """See RepositoryFormat.get_format_string()."""
         return "Bazaar RepositoryFormatKnitPack5RichRoot (bzr 1.6)\n"
 
     def get_format_description(self):
-        return "Packs 5 rich-root (adds stacking support, requires bzr 1.6)"
+        return ("Packs 5 rich-root (adds stacking support, requires bzr 1.6)"
+                " (deprecated)")
 
 
 class RepositoryFormatPackDevelopment0(RepositoryFormatPack):

=== modified file 'bzrlib/repository.py'
--- a/bzrlib/repository.py	2008-08-19 14:54:08 +0000
+++ b/bzrlib/repository.py	2008-08-29 19:32:00 +0000
@@ -2306,9 +2306,14 @@
     'RepositoryFormatKnitPack5',
     )
 format_registry.register_lazy(
+    'Bazaar RepositoryFormatKnitPack5RichRoot (bzr 1.6.1)\n',
+    'bzrlib.repofmt.pack_repo',
+    'RepositoryFormatKnitPack5RichRoot',
+    )
+format_registry.register_lazy(
     'Bazaar RepositoryFormatKnitPack5RichRoot (bzr 1.6)\n',
     'bzrlib.repofmt.pack_repo',
-    'RepositoryFormatKnitPack5RichRoot',
+    'RepositoryFormatKnitPack5RichRootBroken',
     )
 
 # Development formats. 
@@ -2909,13 +2914,17 @@
     @staticmethod
     def is_compatible(source, target):
         """Be compatible with Knit1 source and Knit3 target"""
-        from bzrlib.repofmt.knitrepo import RepositoryFormatKnit3
         try:
-            from bzrlib.repofmt.knitrepo import (RepositoryFormatKnit1,
-                RepositoryFormatKnit3)
+            from bzrlib.repofmt.knitrepo import (
+                RepositoryFormatKnit1,
+                RepositoryFormatKnit3,
+                )
             from bzrlib.repofmt.pack_repo import (
                 RepositoryFormatKnitPack1,
                 RepositoryFormatKnitPack3,
+                RepositoryFormatKnitPack4,
+                RepositoryFormatKnitPack5,
+                RepositoryFormatKnitPack5RichRoot,
                 RepositoryFormatPackDevelopment0,
                 RepositoryFormatPackDevelopment0Subtree,
                 )
@@ -2923,6 +2932,9 @@
                 RepositoryFormatKnit1,
                 RepositoryFormatKnitPack1,
                 RepositoryFormatPackDevelopment0,
+                RepositoryFormatKnitPack4,
+                RepositoryFormatKnitPack5,
+                RepositoryFormatKnitPack5RichRoot,
                 )
             subtrees = (
                 RepositoryFormatKnit3,

=== modified file 'bzrlib/tests/blackbox/test_info.py'
--- a/bzrlib/tests/blackbox/test_info.py	2008-07-24 06:10:47 +0000
+++ b/bzrlib/tests/blackbox/test_info.py	2008-08-29 05:18:56 +0000
@@ -247,7 +247,7 @@
         branch5 = tree5.branch
         out, err = self.run_bzr('info -v lightcheckout')
         self.assertEqualDiff(
-"""Lightweight checkout (format: 1.6 or 1.6-rich-root \
+"""Lightweight checkout (format: 1.6 or 1.6.1-rich-root \
 or dirstate or dirstate-tags or \
 pack-0.92 or rich-root or rich-root-pack)
 Location:
@@ -415,7 +415,7 @@
         # Out of date lightweight checkout
         out, err = self.run_bzr('info lightcheckout --verbose')
         self.assertEqualDiff(
-"""Lightweight checkout (format: 1.6 or 1.6-rich-root or \
+"""Lightweight checkout (format: 1.6 or 1.6.1-rich-root or \
 dirstate or dirstate-tags or \
 pack-0.92 or rich-root or rich-root-pack)
 Location:
@@ -552,7 +552,7 @@
         datestring_first = format_date(rev.timestamp, rev.timezone)
         out, err = self.run_bzr('info tree/lightcheckout --verbose')
         self.assertEqualDiff(
-"""Lightweight checkout (format: 1.6 or 1.6-rich-root or \
+"""Lightweight checkout (format: 1.6 or 1.6.1-rich-root or \
 dirstate or dirstate-tags or \
 pack-0.92 or rich-root or rich-root-pack)
 Location:
@@ -676,7 +676,7 @@
         datestring_last = format_date(rev.timestamp, rev.timezone)
         out, err = self.run_bzr('info tree/lightcheckout --verbose')
         self.assertEqualDiff(
-"""Lightweight checkout (format: 1.6 or 1.6-rich-root or \
+"""Lightweight checkout (format: 1.6 or 1.6.1-rich-root or \
 dirstate or dirstate-tags or \
 pack-0.92 or rich-root or rich-root-pack)
 Location:
@@ -1092,7 +1092,7 @@
             (False, True): 'Lightweight checkout',
             (False, False): 'Checkout',
             }[(shared_repo is not None, light_checkout)]
-        format = {True: '1.6 or 1.6-rich-root'
+        format = {True: '1.6 or 1.6.1-rich-root'
                         ' or dirstate or dirstate-tags or pack-0.92'
                         ' or rich-root or rich-root-pack',
                   False: 'dirstate'}[light_checkout]

=== modified file 'bzrlib/tests/test_bzrdir.py'
--- a/bzrlib/tests/test_bzrdir.py	2008-08-28 21:24:49 +0000
+++ b/bzrlib/tests/test_bzrdir.py	2008-08-29 21:08:16 +0000
@@ -489,15 +489,8 @@
     def test_sprout_upgrades_to_rich_root_format_if_needed(self):
         child_branch, new_child_transport = self.prepare_default_stacking(
             child_format='rich-root-pack')
-        def do_sprout():
-            try:
-                return child_branch.bzrdir.sprout(new_child_transport.base,
-                                                  stacked=True)
-            except errors.IncompatibleRepositories:
-                raise AssertionError(
-                    'Rich root format should be sprout-compatible')
-        self.expectFailure('Rich root format should be sprout-compatible',
-                           do_sprout)
+        new_child = child_branch.bzrdir.sprout(new_child_transport.base,
+                                               stacked=True)
         repo = new_child.open_repository()
         self.assertTrue(repo._format.supports_external_lookups)
         self.assertTrue(repo.supports_rich_root())

=== modified file 'bzrlib/tests/test_fetch.py'
--- a/bzrlib/tests/test_fetch.py	2008-08-18 22:34:21 +0000
+++ b/bzrlib/tests/test_fetch.py	2008-08-29 02:05:22 +0000
@@ -374,8 +374,12 @@
         self.assertEqual(('get_record_stream', [('rev-one',)],
                           target._fetch_order, False),
                          self.find_get_record_stream(source.inventories.calls))
+        # Because of bugs in the old fetch code, revisions could accidentally
+        # have deltas present in knits. However, it was never intended, so we
+        # always for include_delta_closure=True, to make sure we get fulltexts.
+        # bug #261339
         self.assertEqual(('get_record_stream', [('rev-one',)],
-                          target._fetch_order, False),
+                          target._fetch_order, True),
                          self.find_get_record_stream(source.revisions.calls))
         # XXX: Signatures is special, and slightly broken. The
         # standard item_keys_introduced_by actually does a lookup for every
@@ -386,7 +390,7 @@
         # we care about.
         signature_calls = source.signatures.calls[-1:]
         self.assertEqual(('get_record_stream', [('rev-one',)],
-                          target._fetch_order, False),
+                          target._fetch_order, True),
                          self.find_get_record_stream(signature_calls))
 
     def test_fetch_no_deltas_with_delta_closure(self):

=== modified file 'bzrlib/tests/test_info.py'
--- a/bzrlib/tests/test_info.py	2008-07-24 05:19:40 +0000
+++ b/bzrlib/tests/test_info.py	2008-08-29 05:18:56 +0000
@@ -146,8 +146,8 @@
             expected = None
             if key in ('dirstate', 'dirstate-tags', 'dirstate-with-subtree',
                 'pack-0.92', 'pack-0.92-subtree', 'rich-root',
-                'rich-root-pack', '1.6', '1.6-rich-root'):
-                expected = '1.6 or 1.6-rich-root or ' \
+                'rich-root-pack', '1.6', '1.6.1-rich-root'):
+                expected = '1.6 or 1.6.1-rich-root or ' \
                     'dirstate or dirstate-tags or pack-0.92 or'\
                     ' rich-root or rich-root-pack'
             if key in ('knit', 'metaweave'):

=== modified file 'bzrlib/tests/test_pack_repository.py'
--- a/bzrlib/tests/test_pack_repository.py	2008-08-28 14:41:10 +0000
+++ b/bzrlib/tests/test_pack_repository.py	2008-08-29 19:32:00 +0000
@@ -497,7 +497,7 @@
     def get_format(self):
         return bzrdir.format_registry.make_bzrdir(self.format_name)
 
-    def test_stack_checks_compatibility(self):
+    def test_stack_checks_rich_root_compatibility(self):
         # early versions of the packing code relied on pack internals to
         # stack, but the current version should be able to stack on any
         # format.
@@ -509,7 +509,10 @@
         if repo.supports_rich_root():
             # can only stack on repositories that have compatible internal
             # metadata
-            matching_format_name = 'pack-0.92-subtree'
+            if getattr(repo._format, 'supports_tree_reference', False):
+                matching_format_name = 'pack-0.92-subtree'
+            else:
+                matching_format_name = 'rich-root-pack'
             mismatching_format_name = 'pack-0.92'
         else:
             matching_format_name = 'pack-0.92'
@@ -526,6 +529,32 @@
             r'KnitPackRepository.*/repo/.*\n'
             r'different rich-root support')
 
+    def test_stack_checks_serializers_compatibility(self):
+        repo = self.make_repository('repo', format=self.get_format())
+        if getattr(repo._format, 'supports_tree_reference', False):
+            # can only stack on repositories that have compatible internal
+            # metadata
+            matching_format_name = 'pack-0.92-subtree'
+            mismatching_format_name = 'rich-root-pack'
+        else:
+            if repo.supports_rich_root():
+                matching_format_name = 'rich-root-pack'
+                mismatching_format_name = 'pack-0.92-subtree'
+            else:
+                raise TestNotApplicable('No formats use non-v5 serializer'
+                    ' without having rich-root also set')
+        base = self.make_repository('base', format=matching_format_name)
+        repo.add_fallback_repository(base)
+        # you can't stack on something with incompatible data
+        bad_repo = self.make_repository('mismatch',
+            format=mismatching_format_name)
+        e = self.assertRaises(errors.IncompatibleRepositories,
+            repo.add_fallback_repository, bad_repo)
+        self.assertContainsRe(str(e),
+            r'(?m)KnitPackRepository.*/mismatch/.*\nis not compatible with\n'
+            r'KnitPackRepository.*/repo/.*\n'
+            r'different serializers')
+
     def test_adding_pack_does_not_record_pack_names_from_other_repositories(self):
         base = self.make_branch_and_tree('base', format=self.get_format())
         base.commit('foo')
@@ -592,9 +621,9 @@
          dict(format_name='1.6',
               format_string="Bazaar RepositoryFormatKnitPack5 (bzr 1.6)\n",
               format_supports_external_lookups=True),
-         dict(format_name='1.6-rich-root',
+         dict(format_name='1.6.1-rich-root',
               format_string="Bazaar RepositoryFormatKnitPack5RichRoot "
-                  "(bzr 1.6)\n",
+                  "(bzr 1.6.1)\n",
               format_supports_external_lookups=True),
          dict(format_name='development0',
               format_string="Bazaar development format 0 "

=== modified file 'bzrlib/tests/test_upgrade_stacked.py'
--- a/bzrlib/tests/test_upgrade_stacked.py	2008-08-04 07:55:41 +0000
+++ b/bzrlib/tests/test_upgrade_stacked.py	2008-08-29 05:18:56 +0000
@@ -74,7 +74,7 @@
 #        ('knit', 'rich-root', True),
         ('knit', '1.6', False),
 #        ('pack-0.92', '1.6', False),
-        ('1.6', '1.6-rich-root', True),
+        ('1.6', '1.6.1-rich-root', True),
         ]
     scenarios = []
     for (old_name, new_name, model_change) in scenario_pairs:

=== modified file 'bzrlib/transport/remote.py'
--- a/bzrlib/transport/remote.py	2008-08-28 21:27:48 +0000
+++ b/bzrlib/transport/remote.py	2008-08-29 19:33:35 +0000
@@ -317,8 +317,6 @@
                                fudge_factor=self._bytes_to_read_before_seek))
 
         try:
-            # if relpath.endswith('.pack'):
-            #     import pdb; pdb.set_trace()
             result = self._client.call_with_body_readv_array(
                 ('readv', self._remote_path(relpath),),
                 [(c.start, c.length) for c in coalesced])




More information about the bazaar-commits mailing list