Rev 4627: (robertc) Change the default format to 2a. (Robert Collins) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Wed Aug 19 00:27:44 BST 2009


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

------------------------------------------------------------
revno: 4627 [merge]
revision-id: pqm at pqm.ubuntu.com-20090818232740-8q7ms2nntw9ckyvq
parent: pqm at pqm.ubuntu.com-20090818162232-zkwunetmap96ai48
parent: robertc at robertcollins.net-20090818220318-kgojwbuz7t2la3kw
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2009-08-19 00:27:40 +0100
message:
  (robertc) Change the default format to 2a. (Robert Collins)
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/branch.py               branch.py-20050309040759-e4baf4e0d046576e
  bzrlib/bzrdir.py               bzrdir.py-20060131065624-156dfea39c4387cb
  bzrlib/tests/blackbox/test_info.py test_info.py-20060215045507-bbdd2d34efab9e0a
  bzrlib/tests/blackbox/test_init.py test_init.py-20060309032856-a292116204d86eb7
  bzrlib/tests/blackbox/test_shared_repository.py test_shared_repository.py-20060317053531-ed30c0d79325e483
  bzrlib/tests/per_repository/test_add_fallback_repository.py test_add_fallback_re-20080215040003-8w9n4ck9uqdxj18m-1
  bzrlib/tests/per_repository/test_repository.py test_repository.py-20060131092128-ad07f494f5c9d26c
  bzrlib/tests/test_branch.py    test_branch.py-20060116013032-97819aa07b8ab3b5
  bzrlib/tests/test_dirstate.py  test_dirstate.py-20060728012006-d6mvoihjb3je9peu-2
  bzrlib/tests/test_foreign.py   test_foreign.py-20081125004048-ywb901edgp9lluxo-1
  bzrlib/tests/test_log.py       testlog.py-20050728115707-1a514809d7d49309
  bzrlib/tests/test_remote.py    test_remote.py-20060720103555-yeeg2x51vn0rbtdp-2
  bzrlib/tests/test_selftest.py  test_selftest.py-20051202044319-c110a115d8c0456a
  bzrlib/tests/test_smart.py     test_smart.py-20061122024551-ol0l0o0oofsu9b3t-2
  bzrlib/tests/test_version_info.py test_version_info.py-20051228204928-2c364e30b702b41b
  bzrlib/workingtree.py          workingtree.py-20050511021032-29b6ec0a681e02e3
=== modified file 'NEWS'
--- a/NEWS	2009-08-18 07:20:02 +0000
+++ b/NEWS	2009-08-18 20:05:30 +0000
@@ -28,6 +28,43 @@
 Compatibility Breaks
 ********************
 
+* The default format for bzr is now ``2a``. This format brings many
+  significant performance and size improvements. bzr can pull from
+  any existing repository into a ``2a`` one, but can only transfer
+  into ``rich-root`` repositories from ``2a``. The Upgrade guide
+  has more information about this change. (Robert Collins)
+
+New Features
+************
+
+Bug Fixes
+*********
+
+Improvements
+************
+
+* A better description of the platform is shown in crash tracebacks, ``bzr
+  --version`` and ``bzr selftest``.
+  (Martin Pool, #409137)
+
+Documentation
+*************
+
+API Changes
+***********
+
+Internals
+*********
+
+Testing
+*******
+
+bzr 1.18
+########
+
+Compatibility Breaks
+********************
+
 * Committing directly to a stacked branch from a lightweight checkout will
   no longer work. In previous versions this would appear to work but would
   generate repositories with insufficient data to create deltas, leading
@@ -116,8 +153,8 @@
   can run the https tests. (Denys Duchier, #392401)
   
 
-bzr 1.18
-########
+bzr 1.18rc1
+###########
 
 :Codename: little traveller
 :1.18rc1: 2009-08-10

=== modified file 'bzrlib/branch.py'
--- a/bzrlib/branch.py	2009-08-17 06:17:21 +0000
+++ b/bzrlib/branch.py	2009-08-17 06:22:18 +0000
@@ -2067,7 +2067,7 @@
 BranchFormat.register_format(__format6)
 BranchFormat.register_format(__format7)
 BranchFormat.register_format(__format8)
-BranchFormat.set_default_format(__format6)
+BranchFormat.set_default_format(__format7)
 _legacy_formats = [BzrBranchFormat4(),
     ]
 network_format_registry.register(

=== modified file 'bzrlib/bzrdir.py'
--- a/bzrlib/bzrdir.py	2009-08-18 01:38:56 +0000
+++ b/bzrlib/bzrdir.py	2009-08-18 05:18:52 +0000
@@ -3864,11 +3864,11 @@
 # The following format should be an alias for the rich root equivalent 
 # of the default format
 format_registry.register_metadir('default-rich-root',
-    'bzrlib.repofmt.pack_repo.RepositoryFormatKnitPack4',
-    help='Default format, rich root variant. (needed for bzr-svn and bzr-git).',
-    branch_format='bzrlib.branch.BzrBranchFormat6',
-    tree_format='bzrlib.workingtree.WorkingTreeFormat4',
+    'bzrlib.repofmt.groupcompress_repo.RepositoryFormat2a',
+    branch_format='bzrlib.branch.BzrBranchFormat7',
+    tree_format='bzrlib.workingtree.WorkingTreeFormat6',
     alias=True,
-    )
+    help='Same as 2a.')
+
 # The current format that is made on 'bzr init'.
-format_registry.set_default('pack-0.92')
+format_registry.set_default('2a')

=== modified file 'bzrlib/tests/blackbox/test_info.py'
--- a/bzrlib/tests/blackbox/test_info.py	2009-08-14 13:55:30 +0000
+++ b/bzrlib/tests/blackbox/test_info.py	2009-08-17 03:47:03 +0000
@@ -37,11 +37,7 @@
 
     def setUp(self):
         ExternalBase.setUp(self)
-        self._repo_strings = (
-            "1.6 or 1.6.1-rich-root "
-            "or 1.9 or 1.9-rich-root "
-            "or dirstate or dirstate-tags or "
-            "pack-0.92 or rich-root or rich-root-pack")
+        self._repo_strings = "2a or development-subtree"
 
     def test_info_non_existing(self):
         if sys.platform == "win32":
@@ -291,7 +287,7 @@
 
 Format:
        control: Meta directory format 1
-  working tree: Working tree format 4
+  working tree: Working tree format 6
         branch: Branch format 4
     repository: Weave repository format 6
 
@@ -453,7 +449,7 @@
 
 Format:
        control: Meta directory format 1
-  working tree: Working tree format 4
+  working tree: Working tree format 6
         branch: Branch format 4
     repository: Weave repository format 6
 
@@ -586,7 +582,7 @@
 
 Format:
        control: Meta directory format 1
-  working tree: Working tree format 4
+  working tree: Working tree format 6
         branch: %s
     repository: %s
 
@@ -617,14 +613,14 @@
         # Out of date checkout
         out, err = self.run_bzr('info -v tree/checkout')
         self.assertEqualDiff(
-"""Checkout (format: dirstate)
+"""Checkout (format: unnamed)
 Location:
        checkout root: tree/checkout
   checkout of branch: repo/branch
 
 Format:
        control: Meta directory format 1
-  working tree: Working tree format 4
+  working tree: Working tree format 6
         branch: %s
     repository: %s
 
@@ -656,14 +652,14 @@
         tree3.add('b')
         out, err = self.run_bzr('info tree/checkout --verbose')
         self.assertEqualDiff(
-"""Checkout (format: dirstate)
+"""Checkout (format: unnamed)
 Location:
        checkout root: tree/checkout
   checkout of branch: repo/branch
 
 Format:
        control: Meta directory format 1
-  working tree: Working tree format 4
+  working tree: Working tree format 6
         branch: %s
     repository: %s
 
@@ -705,7 +701,7 @@
 
 Format:
        control: Meta directory format 1
-  working tree: Working tree format 4
+  working tree: Working tree format 6
         branch: %s
     repository: %s
 
@@ -1131,7 +1127,7 @@
             (False, False): 'Checkout',
             }[(shared_repo is not None, light_checkout)]
         format = {True: self._repo_strings,
-                  False: 'dirstate'}[light_checkout]
+                  False: 'unnamed'}[light_checkout]
         if repo_locked:
             repo_locked = lco_tree.branch.repository.get_physical_lock_status()
         if repo_locked or branch_locked or tree_locked:

=== modified file 'bzrlib/tests/blackbox/test_init.py'
--- a/bzrlib/tests/blackbox/test_init.py	2009-08-12 21:58:32 +0000
+++ b/bzrlib/tests/blackbox/test_init.py	2009-08-12 22:16:29 +0000
@@ -35,7 +35,7 @@
 
     def setUp(self):
         ExternalBase.setUp(self)
-        self._default_label = 'pack-0.92'
+        self._default_label = '2a'
 
     def test_init_with_format(self):
         # Verify bzr init --format constructs something plausible

=== modified file 'bzrlib/tests/blackbox/test_shared_repository.py'
--- a/bzrlib/tests/blackbox/test_shared_repository.py	2009-03-23 14:59:43 +0000
+++ b/bzrlib/tests/blackbox/test_shared_repository.py	2009-08-12 23:52:15 +0000
@@ -27,7 +27,7 @@
     def test_make_repository(self):
         out, err = self.run_bzr("init-repository a")
         self.assertEqual(out,
-"""Shared repository with trees (format: pack-0.92)
+"""Shared repository with trees (format: 2a)
 Location:
   shared repository: a
 """)

=== modified file 'bzrlib/tests/per_repository/test_add_fallback_repository.py'
--- a/bzrlib/tests/per_repository/test_add_fallback_repository.py	2009-03-23 14:59:43 +0000
+++ b/bzrlib/tests/per_repository/test_add_fallback_repository.py	2009-08-13 05:17:12 +0000
@@ -29,14 +29,7 @@
 class TestAddFallbackRepository(TestCaseWithRepository):
 
     def test_add_fallback_repository(self):
-        if isinstance(self.repository_format, remote.RemoteRepositoryFormat):
-            # RemoteRepository by default builds a default format real
-            # repository, but the default format is unstackble.  So explicitly
-            # make a stackable real repository and use that.
-            repo = self.make_repository('repo', format='1.9')
-            repo = bzrdir.BzrDir.open(self.get_url('repo')).open_repository()
-        else:
-            repo = self.make_repository('repo')
+        repo = self.make_repository('repo')
         tree = self.make_branch_and_tree('branch')
         if not repo._format.supports_external_lookups:
             self.assertRaises(errors.UnstackableRepositoryFormat,

=== modified file 'bzrlib/tests/per_repository/test_repository.py'
--- a/bzrlib/tests/per_repository/test_repository.py	2009-06-26 09:24:34 +0000
+++ b/bzrlib/tests/per_repository/test_repository.py	2009-08-18 22:03:18 +0000
@@ -25,6 +25,7 @@
     errors,
     gpg,
     graph,
+    info,
     osutils,
     remote,
     repository,
@@ -33,6 +34,9 @@
 from bzrlib.branch import BzrBranchFormat6
 from bzrlib.delta import TreeDelta
 from bzrlib.inventory import CommonInventory, Inventory, InventoryDirectory
+from bzrlib.repofmt.pack_repo import (
+    RepositoryFormatKnitPack5RichRootBroken,
+    )
 from bzrlib.repofmt.weaverepo import (
     RepositoryFormat5,
     RepositoryFormat6,
@@ -913,29 +917,49 @@
             local_branch.repository._format.supports_external_lookups,
             remote_branch.repository._format.supports_external_lookups)
 
-    def test_clone_unstackable_branch_preserves_stackable_repo_format(self):
-        """Cloning an unstackable branch format to a somewhere with a default
-        stack-on branch preserves the repository format.  (i.e. if the source
-        repository is stackable, the branch format is upgraded but the
-        repository format is preserved.)
+    def test_clone_stacking_policy_upgrades(self):
+        """Cloning an unstackable branch format to somewhere with a default
+        stack-on branch upgrades branch and repo to match the target and honour
+        the policy.
         """
         try:
             repo = self.make_repository('repo', shared=True)
         except errors.IncompatibleFormat:
             raise TestNotApplicable('Cannot make a shared repository')
+        if isinstance(repo.bzrdir, bzrdir.BzrDirPreSplitOut):
+            raise KnownFailure("pre metadir branches do not upgrade on push "
+                "with stacking policy")
+        if isinstance(repo._format, RepositoryFormatKnitPack5RichRootBroken):
+            raise TestNotApplicable("unsupported format")
         # Make a source branch in 'repo' in an unstackable branch format
         bzrdir_format = self.repository_format._matchingbzrdir
         transport = self.get_transport('repo/branch')
         transport.mkdir('.')
         target_bzrdir = bzrdir_format.initialize_on_transport(transport)
         branch = BzrBranchFormat6().initialize(target_bzrdir)
-        #branch = self.make_branch('repo/branch', format='pack-0.92')
-        self.make_branch('stack-on-me')
+        # Ensure that stack_on will be stackable and match the serializer of
+        # repo.
+        if isinstance(repo, remote.RemoteRepository):
+            repo._ensure_real()
+            info_repo = repo._real_repository
+        else:
+            info_repo = repo
+        format_description = info.describe_format(info_repo.bzrdir,
+            info_repo, None, None)
+        formats = format_description.split(' or ')
+        stack_on_format = formats[0]
+        if stack_on_format in ["pack-0.92", "dirstate", "metaweave"]:
+            stack_on_format = "1.9"
+        elif stack_on_format in ["dirstate-with-subtree", "rich-root",
+            "rich-root-pack", "pack-0.92-subtree"]:
+            stack_on_format = "1.9-rich-root"
+        # formats not tested for above are already stackable, so we can use the
+        # format as-is.
+        stack_on = self.make_branch('stack-on-me', format=stack_on_format)
         self.make_bzrdir('.').get_config().set_default_stack_on('stack-on-me')
         target = branch.bzrdir.clone(self.get_url('target'))
-        # The target branch supports stacking if the source repository does.
-        self.assertEqual(repo._format.supports_external_lookups,
-                         target.open_branch()._format.supports_stacking())
+        # The target branch supports stacking.
+        self.assertTrue(target.open_branch()._format.supports_stacking())
         if isinstance(repo, remote.RemoteRepository):
             repo._ensure_real()
             repo = repo._real_repository
@@ -943,8 +967,12 @@
         if isinstance(target_repo, remote.RemoteRepository):
             target_repo._ensure_real()
             target_repo = target_repo._real_repository
-        # The repository format is preserved.
-        self.assertEqual(repo._format, target_repo._format)
+        # The repository format is unchanged if it could already stack, or the
+        # same as the stack on.
+        if repo._format.supports_external_lookups:
+            self.assertEqual(repo._format, target_repo._format)
+        else:
+            self.assertEqual(stack_on.repository._format, target_repo._format)
 
     def test__get_sink(self):
         repo = self.make_repository('repo')

=== modified file 'bzrlib/tests/test_branch.py'
--- a/bzrlib/tests/test_branch.py	2009-07-10 05:49:34 +0000
+++ b/bzrlib/tests/test_branch.py	2009-08-17 21:15:40 +0000
@@ -40,6 +40,7 @@
     BzrBranch5,
     BzrBranchFormat5,
     BzrBranchFormat6,
+    BzrBranchFormat7,
     PullResult,
     _run_with_write_locked_target,
     )
@@ -60,7 +61,7 @@
     def test_default_format(self):
         # update this if you change the default branch format
         self.assertIsInstance(BranchFormat.get_default_format(),
-                BzrBranchFormat6)
+                BzrBranchFormat7)
 
     def test_default_format_is_same_as_bzrdir_default(self):
         # XXX: it might be nice if there was only one place the default was

=== modified file 'bzrlib/tests/test_dirstate.py'
--- a/bzrlib/tests/test_dirstate.py	2009-07-15 01:13:20 +0000
+++ b/bzrlib/tests/test_dirstate.py	2009-08-17 03:33:56 +0000
@@ -419,7 +419,7 @@
             (('', '', tree.get_root_id()), # common details
              [('d', '', 0, False, dirstate.DirState.NULLSTAT), # current tree
               ('d', '', 0, False, rev_id), # first parent details
-              ('d', '', 0, False, rev_id2), # second parent details
+              ('d', '', 0, False, rev_id), # second parent details
              ])])
         state = dirstate.DirState.from_tree(tree, 'dirstate')
         self.check_state_with_reopen(expected_result, state)
@@ -500,7 +500,7 @@
             (('', '', tree.get_root_id()), # common details
              [('d', '', 0, False, dirstate.DirState.NULLSTAT), # current tree
               ('d', '', 0, False, rev_id), # first parent details
-              ('d', '', 0, False, rev_id2), # second parent details
+              ('d', '', 0, False, rev_id), # second parent details
              ]),
             (('', 'a file', 'a-file-id'), # common
              [('f', '', 0, False, dirstate.DirState.NULLSTAT), # current
@@ -1000,7 +1000,7 @@
                 [(('', '', root_id), [
                   ('d', '', 0, False, dirstate.DirState.NULLSTAT),
                   ('d', '', 0, False, revid1),
-                  ('d', '', 0, False, revid2)
+                  ('d', '', 0, False, revid1)
                   ])],
                 list(state._iter_entries()))
         finally:
@@ -1034,7 +1034,7 @@
             (('', '', root_id), [
              ('d', '', 0, False, dirstate.DirState.NULLSTAT),
              ('d', '', 0, False, revid1.encode('utf8')),
-             ('d', '', 0, False, revid2.encode('utf8'))
+             ('d', '', 0, False, revid1.encode('utf8'))
              ]),
             (('', 'a file', 'file-id'), [
              ('a', '', 0, False, ''),

=== modified file 'bzrlib/tests/test_foreign.py'
--- a/bzrlib/tests/test_foreign.py	2009-08-14 04:30:32 +0000
+++ b/bzrlib/tests/test_foreign.py	2009-08-17 07:54:34 +0000
@@ -320,7 +320,7 @@
         foreign.update_workingtree_fileids(wt, target_basis)
         wt.lock_read()
         try:
-            self.assertEquals([root_id, "bla-b"], list(wt.inventory))
+            self.assertEquals(set([root_id, "bla-b"]), set(wt.inventory))
         finally:
             wt.unlock()
 

=== modified file 'bzrlib/tests/test_log.py'
--- a/bzrlib/tests/test_log.py	2009-08-17 19:31:29 +0000
+++ b/bzrlib/tests/test_log.py	2009-08-17 23:15:55 +0000
@@ -142,6 +142,9 @@
         lf = LogCatcher()
         log.show_log(wt.branch, lf, verbose=True)
         committed_msg = lf.revisions[0].rev.message
+        if msg == committed_msg:
+            raise tests.KnownFailure(
+                "Commit message was preserved, but it wasn't expected to be.")
         self.assertNotEqual(msg, committed_msg)
         self.assertTrue(len(committed_msg) > len(msg))
 

=== modified file 'bzrlib/tests/test_remote.py'
--- a/bzrlib/tests/test_remote.py	2009-08-14 00:55:42 +0000
+++ b/bzrlib/tests/test_remote.py	2009-08-17 21:24:24 +0000
@@ -661,8 +661,9 @@
         network_name = reference_format.network_name()
         client.add_expected_call(
             'BzrDir.create_repository', ('quack/',
-                'Bazaar pack repository format 1 (needs bzr 0.92)\n', 'False'),
-            'success', ('ok', 'no', 'no', 'no', network_name))
+                'Bazaar repository format 2a (needs bzr 1.16 or later)\n',
+                'False'),
+            'success', ('ok', 'yes', 'yes', 'yes', network_name))
         a_bzrdir = RemoteBzrDir(transport, remote.RemoteBzrDirFormat(),
             _client=client)
         repo = a_bzrdir.create_repository()
@@ -670,9 +671,9 @@
         self.assertIsInstance(repo, remote.RemoteRepository)
         # its format should have the settings from the response
         format = repo._format
-        self.assertFalse(format.rich_root_data)
-        self.assertFalse(format.supports_tree_reference)
-        self.assertFalse(format.supports_external_lookups)
+        self.assertTrue(format.rich_root_data)
+        self.assertTrue(format.supports_tree_reference)
+        self.assertTrue(format.supports_external_lookups)
         self.assertEqual(network_name, format.network_name())
 
 
@@ -2354,6 +2355,7 @@
         """
         # Define a stream using generators so that it isn't rewindable.
         inv = inventory.Inventory(revision_id='rev1')
+        inv.root.revision = 'rev1'
         def stream_with_inv_delta():
             yield ('inventories', inventories_substream())
             yield ('inventory-deltas', inventory_delta_substream())

=== modified file 'bzrlib/tests/test_selftest.py'
--- a/bzrlib/tests/test_selftest.py	2009-08-15 09:15:03 +0000
+++ b/bzrlib/tests/test_selftest.py	2009-08-17 03:47:03 +0000
@@ -40,6 +40,7 @@
     workingtree,
     )
 from bzrlib.repofmt import (
+    groupcompress_repo,
     pack_repo,
     weaverepo,
     )
@@ -215,24 +216,24 @@
         from bzrlib.tests.per_repository import formats_to_scenarios
         formats = [("(c)", remote.RemoteRepositoryFormat()),
                    ("(d)", repository.format_registry.get(
-                        'Bazaar pack repository format 1 (needs bzr 0.92)\n'))]
+                    'Bazaar repository format 2a (needs bzr 1.16 or later)\n'))]
         no_vfs_scenarios = formats_to_scenarios(formats, "server", "readonly",
             None)
         vfs_scenarios = formats_to_scenarios(formats, "server", "readonly",
             vfs_transport_factory="vfs")
         # no_vfs generate scenarios without vfs_transport_factory
-        self.assertEqual([
+        expected = [
             ('RemoteRepositoryFormat(c)',
              {'bzrdir_format': remote.RemoteBzrDirFormat(),
               'repository_format': remote.RemoteRepositoryFormat(),
               'transport_readonly_server': 'readonly',
               'transport_server': 'server'}),
-            ('RepositoryFormatKnitPack1(d)',
+            ('RepositoryFormat2a(d)',
              {'bzrdir_format': bzrdir.BzrDirMetaFormat1(),
-              'repository_format': pack_repo.RepositoryFormatKnitPack1(),
+              'repository_format': groupcompress_repo.RepositoryFormat2a(),
               'transport_readonly_server': 'readonly',
-              'transport_server': 'server'})],
-            no_vfs_scenarios)
+              'transport_server': 'server'})]
+        self.assertEqual(expected, no_vfs_scenarios)
         self.assertEqual([
             ('RemoteRepositoryFormat(c)',
              {'bzrdir_format': remote.RemoteBzrDirFormat(),
@@ -240,9 +241,9 @@
               'transport_readonly_server': 'readonly',
               'transport_server': 'server',
               'vfs_transport_factory': 'vfs'}),
-            ('RepositoryFormatKnitPack1(d)',
+            ('RepositoryFormat2a(d)',
              {'bzrdir_format': bzrdir.BzrDirMetaFormat1(),
-              'repository_format': pack_repo.RepositoryFormatKnitPack1(),
+              'repository_format': groupcompress_repo.RepositoryFormat2a(),
               'transport_readonly_server': 'readonly',
               'transport_server': 'server',
               'vfs_transport_factory': 'vfs'})],

=== modified file 'bzrlib/tests/test_smart.py'
--- a/bzrlib/tests/test_smart.py	2009-08-17 20:53:59 +0000
+++ b/bzrlib/tests/test_smart.py	2009-08-17 23:15:55 +0000
@@ -456,7 +456,7 @@
     def test_stacked_branch(self):
         """Opening a stacked branch does not open the stacked-on branch."""
         trunk = self.make_branch('trunk')
-        feature = self.make_branch('feature', format='1.9')
+        feature = self.make_branch('feature')
         feature.set_stacked_on_url(trunk.base)
         opened_branches = []
         Branch.hooks.install_named_hook('open', opened_branches.append, None)

=== modified file 'bzrlib/tests/test_version_info.py'
--- a/bzrlib/tests/test_version_info.py	2009-04-06 02:54:14 +0000
+++ b/bzrlib/tests/test_version_info.py	2009-08-12 21:27:50 +0000
@@ -148,12 +148,11 @@
         stanza = regen(check_for_clean=True, include_file_revisions=True)
         self.assertEqual(['False'], stanza.get_all('clean'))
 
-        # XXX: This assumes it's being run against a repository that updates
-        # the root revision on every commit.  Newer ones that use
-        # RootCommitBuilder won't update it on each commit.
+        # This assumes it's being run against a tree that does not update the
+        # root revision on every commit.
         file_rev_stanza = get_one_stanza(stanza, 'file-revisions')
         self.assertEqual(['', 'a', 'b', 'c'], file_rev_stanza.get_all('path'))
-        self.assertEqual(['r3', 'r3', 'r2', 'unversioned'],
+        self.assertEqual(['r1', 'r3', 'r2', 'unversioned'],
             file_rev_stanza.get_all('revision'))
         os.remove('branch/c')
 
@@ -171,7 +170,7 @@
         file_rev_stanza = get_one_stanza(stanza, 'file-revisions')
         self.assertEqual(['', 'a', 'b', 'c', 'd'],
                           file_rev_stanza.get_all('path'))
-        self.assertEqual(['r3', 'modified', 'renamed to d', 'new',
+        self.assertEqual(['r1', 'modified', 'renamed to d', 'new',
                           'renamed from b'],
                          file_rev_stanza.get_all('revision'))
 
@@ -181,7 +180,7 @@
         stanza = regen(check_for_clean=True, include_file_revisions=True)
         file_rev_stanza = get_one_stanza(stanza, 'file-revisions')
         self.assertEqual(['', 'a', 'c', 'd'], file_rev_stanza.get_all('path'))
-        self.assertEqual(['r4', 'r4', 'unversioned', 'removed'],
+        self.assertEqual(['r1', 'r4', 'unversioned', 'removed'],
                          file_rev_stanza.get_all('revision'))
 
     def test_python_null(self):

=== modified file 'bzrlib/workingtree.py'
--- a/bzrlib/workingtree.py	2009-08-14 02:35:01 +0000
+++ b/bzrlib/workingtree.py	2009-08-14 02:43:55 +0000
@@ -3030,10 +3030,10 @@
         return self.get_format_string()
 
 
-__default_format = WorkingTreeFormat4()
+__default_format = WorkingTreeFormat6()
 WorkingTreeFormat.register_format(__default_format)
-WorkingTreeFormat.register_format(WorkingTreeFormat6())
 WorkingTreeFormat.register_format(WorkingTreeFormat5())
+WorkingTreeFormat.register_format(WorkingTreeFormat4())
 WorkingTreeFormat.register_format(WorkingTreeFormat3())
 WorkingTreeFormat.set_default_format(__default_format)
 # formats which have no format string are not discoverable




More information about the bazaar-commits mailing list