Rev 4230: 1.14 formats (Ian Clatworthy) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Wed Apr 1 12:16:44 BST 2009


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

------------------------------------------------------------
revno: 4230
revision-id: pqm at pqm.ubuntu.com-20090401111640-wnn3068uv1nc8lhj
parent: pqm at pqm.ubuntu.com-20090401063434-motksin95y4undi6
parent: ian.clatworthy at canonical.com-20090401102233-nb0x50guwk2cmlk4
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2009-04-01 12:16:40 +0100
message:
  1.14 formats (Ian Clatworthy)
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/bzrdir.py               bzrdir.py-20060131065624-156dfea39c4387cb
  bzrlib/help_topics/__init__.py help_topics.py-20060920210027-rnim90q9e0bwxvy4-1
  bzrlib/tests/blackbox/test_add.py test_add.py-20060518072250-857e4f86f54a30b2
  bzrlib/tests/blackbox/test_filtered_view_ops.py test_filtered_view_o-20081110012645-5t7ogtola0l33lkg-1
  bzrlib/tests/blackbox/test_view.py test_view.py-20080731135100-66o8o32heop7augi-1
  bzrlib/tests/test_info.py      test_info.py-20070320150933-m0xxm1g7xi9v6noe-1
  bzrlib/transform.py            transform.py-20060105172343-dd99e54394d91687
  bzrlib/workingtree.py          workingtree.py-20050511021032-29b6ec0a681e02e3
  bzrlib/workingtree_4.py        workingtree_4.py-20070208044105-5fgpc5j3ljlh5q6c-1
  doc/en/user-guide/filtered_views.txt filtered_views.txt-20090226100856-a16ba1v97v91ru58-1
    ------------------------------------------------------------
    revno: 4229.1.1
    revision-id: ian.clatworthy at canonical.com-20090401102233-nb0x50guwk2cmlk4
    parent: pqm at pqm.ubuntu.com-20090401063434-motksin95y4undi6
    parent: ian.clatworthy at canonical.com-20090331141327-x4rzqnx90pd1nsuc
    committer: Ian Clatworthy <ian.clatworthy at canonical.com>
    branch nick: ianc-integration
    timestamp: Wed 2009-04-01 20:22:33 +1000
    message:
      1.14 formats (Ian Clatworthy)
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/bzrdir.py               bzrdir.py-20060131065624-156dfea39c4387cb
      bzrlib/help_topics/__init__.py help_topics.py-20060920210027-rnim90q9e0bwxvy4-1
      bzrlib/tests/blackbox/test_add.py test_add.py-20060518072250-857e4f86f54a30b2
      bzrlib/tests/blackbox/test_filtered_view_ops.py test_filtered_view_o-20081110012645-5t7ogtola0l33lkg-1
      bzrlib/tests/blackbox/test_view.py test_view.py-20080731135100-66o8o32heop7augi-1
      bzrlib/tests/test_info.py      test_info.py-20070320150933-m0xxm1g7xi9v6noe-1
      bzrlib/transform.py            transform.py-20060105172343-dd99e54394d91687
      bzrlib/workingtree.py          workingtree.py-20050511021032-29b6ec0a681e02e3
      bzrlib/workingtree_4.py        workingtree_4.py-20070208044105-5fgpc5j3ljlh5q6c-1
      doc/en/user-guide/filtered_views.txt filtered_views.txt-20090226100856-a16ba1v97v91ru58-1
    ------------------------------------------------------------
    revno: 4210.4.3
    revision-id: ian.clatworthy at canonical.com-20090331141327-x4rzqnx90pd1nsuc
    parent: ian.clatworthy at canonical.com-20090331141227-8dr1s44x16j7dina
    parent: pqm at pqm.ubuntu.com-20090331100842-0x25r10mpiyxv5d9
    committer: Ian Clatworthy <ian.clatworthy at canonical.com>
    branch nick: bzr.114
    timestamp: Wed 2009-04-01 00:13:27 +1000
    message:
      merge bzr.dev r4221
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/builtins.py             builtins.py-20050830033751-fc01482b9ca23183
      bzrlib/commit.py               commit.py-20050511101309-79ec1a0168e0e825
      bzrlib/diff.py                 diff.py-20050309040759-26944fbbf2ebbf36
      bzrlib/filters/__init__.py     __init__.py-20080416080515-mkxl29amuwrf6uir-2
      bzrlib/log.py                  log.py-20050505065812-c40ce11702fe5fb1
      bzrlib/plugins/launchpad/__init__.py __init__.py-20060315182712-2d5feebd2a1032dc
      bzrlib/repository.py           rev_storage.py-20051111201905-119e9401e46257e3
      bzrlib/tests/blackbox/test_commit.py test_commit.py-20060212094538-ae88fc861d969db0
      bzrlib/tests/blackbox/test_filtered_view_ops.py test_filtered_view_o-20081110012645-5t7ogtola0l33lkg-1
      bzrlib/tests/blackbox/test_log.py test_log.py-20060112090212-78f6ea560c868e24
      bzrlib/tests/per_repository/test_commit_builder.py test_commit_builder.py-20060606110838-76e3ra5slucqus81-1
      bzrlib/tests/test_commit.py    test_commit.py-20050914060732-279f057f8c295434
      bzrlib/tests/test_diff.py      testdiff.py-20050727164403-d1a3496ebb12e339
      bzrlib/tests/test_filters.py   test_filters.py-20080417120614-tc3zok0vvvprsc99-1
      bzrlib/tests/test_log.py       testlog.py-20050728115707-1a514809d7d49309
      bzrlib/tests/test_upgrade.py   test_upgrade.py-20051004040251-555fe1d2bae1bc71
      bzrlib/tests/workingtree_implementations/test_commit.py test_commit.py-20060421013633-1610ec2331c8190f
      bzrlib/upgrade.py              history2weaves.py-20050818063535-e7d319791c19a8b2
      bzrlib/workingtree.py          workingtree.py-20050511021032-29b6ec0a681e02e3
      bzrlib/workingtree_4.py        workingtree_4.py-20070208044105-5fgpc5j3ljlh5q6c-1
      doc/en/user-guide/browsing_history.txt browsing_history.txt-20071121073725-0corxykv5irjal00-2
    ------------------------------------------------------------
    revno: 4210.4.2
    revision-id: ian.clatworthy at canonical.com-20090331141227-8dr1s44x16j7dina
    parent: ian.clatworthy at canonical.com-20090328012754-et08kurwwapknnbz
    committer: Ian Clatworthy <ian.clatworthy at canonical.com>
    branch nick: bzr.114
    timestamp: Wed 2009-04-01 00:12:27 +1000
    message:
      split filtered views support out into WorkingTreeFormat6
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/bzrdir.py               bzrdir.py-20060131065624-156dfea39c4387cb
      bzrlib/tests/blackbox/test_add.py test_add.py-20060518072250-857e4f86f54a30b2
      bzrlib/tests/blackbox/test_filtered_view_ops.py test_filtered_view_o-20081110012645-5t7ogtola0l33lkg-1
      bzrlib/tests/blackbox/test_view.py test_view.py-20080731135100-66o8o32heop7augi-1
      bzrlib/tests/test_info.py      test_info.py-20070320150933-m0xxm1g7xi9v6noe-1
      bzrlib/workingtree.py          workingtree.py-20050511021032-29b6ec0a681e02e3
      bzrlib/workingtree_4.py        workingtree_4.py-20070208044105-5fgpc5j3ljlh5q6c-1
      doc/en/user-guide/filtered_views.txt filtered_views.txt-20090226100856-a16ba1v97v91ru58-1
    ------------------------------------------------------------
    revno: 4210.4.1
    revision-id: ian.clatworthy at canonical.com-20090328012754-et08kurwwapknnbz
    parent: pqm at pqm.ubuntu.com-20090327165538-lustxviiwnrfg2u2
    committer: Ian Clatworthy <ian.clatworthy at canonical.com>
    branch nick: bzr.114
    timestamp: Sat 2009-03-28 11:27:54 +1000
    message:
      replace experimental development-wt5 formats with 1.14 formats
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/bzrdir.py               bzrdir.py-20060131065624-156dfea39c4387cb
      bzrlib/help_topics/__init__.py help_topics.py-20060920210027-rnim90q9e0bwxvy4-1
      bzrlib/tests/blackbox/test_add.py test_add.py-20060518072250-857e4f86f54a30b2
      bzrlib/tests/blackbox/test_filtered_view_ops.py test_filtered_view_o-20081110012645-5t7ogtola0l33lkg-1
      bzrlib/tests/blackbox/test_view.py test_view.py-20080731135100-66o8o32heop7augi-1
      bzrlib/tests/test_info.py      test_info.py-20070320150933-m0xxm1g7xi9v6noe-1
      doc/en/user-guide/filtered_views.txt filtered_views.txt-20090226100856-a16ba1v97v91ru58-1
=== modified file 'NEWS'
--- a/NEWS	2009-04-01 05:02:38 +0000
+++ b/NEWS	2009-04-01 10:22:33 +0000
@@ -25,6 +25,13 @@
 New Features
 ************
 
+* New formats ``1.14`` and ``1.14-rich-root`` supporting End-Of-Line
+  (EOL) conversions, keyword templating (via the bzr-keywords plugin)
+  and generic content filtering. These formats replace the experimental
+  ``development-wt5`` and ``development-wt5-rich-root`` formats
+  respectively, but have support for filtered views disabled.
+  (Ian Clatworthy)
+
 * New ``guess-renames`` command recognizes renames after they occur.
   (Aaron Bentley)
 
@@ -119,8 +126,8 @@
   when pushing to a smart server.  (Andrew Bennetts, #334114)
 
 * Fixed "Specified file 'x/y/z' is outside current view: " occurring
-  on ``bzr add x/y/z`` in WorkingTree5 formats (e.g. ``development-wt5``)
-  when no view is defined.  (Ian Clatworthy, #344708)
+  on ``bzr add x/y/z`` in formats supporting views when no view is
+  defined.  (Ian Clatworthy, #344708)
 
 * It is no longer possible to fetch between repositories while the
   target repository is in a write group. This prevents race conditions

=== modified file 'bzrlib/bzrdir.py'
--- a/bzrlib/bzrdir.py	2009-03-25 04:20:12 +0000
+++ b/bzrlib/bzrdir.py	2009-03-31 14:12:27 +0000
@@ -2751,6 +2751,11 @@
                 isinstance(self.target_format.workingtree_format,
                     workingtree_4.WorkingTreeFormat5)):
                 workingtree_4.Converter4to5().convert(tree)
+            if (isinstance(tree, workingtree_4.DirStateWorkingTree) and
+                not isinstance(tree, workingtree_4.WorkingTree6) and
+                isinstance(self.target_format.workingtree_format,
+                    workingtree_4.WorkingTreeFormat6)):
+                workingtree_4.Converter4or5to6().convert(tree)
         return to_convert
 
 
@@ -3342,20 +3347,18 @@
     branch_format='bzrlib.branch.BzrBranchFormat7',
     tree_format='bzrlib.workingtree.WorkingTreeFormat4',
     )
-format_registry.register_metadir('development-wt5',
+format_registry.register_metadir('1.14',
     'bzrlib.repofmt.pack_repo.RepositoryFormatKnitPack6',
-    help='A working-tree format that supports views and content filtering.',
+    help='A working-tree format that supports content filtering.',
     branch_format='bzrlib.branch.BzrBranchFormat7',
     tree_format='bzrlib.workingtree.WorkingTreeFormat5',
-    experimental=True,
     )
-format_registry.register_metadir('development-wt5-rich-root',
+format_registry.register_metadir('1.14-rich-root',
     'bzrlib.repofmt.pack_repo.RepositoryFormatKnitPack6RichRoot',
-    help='A variant of development-wt5 that supports rich-root data '
+    help='A variant of 1.14 that supports rich-root data '
          '(needed for bzr-svn and bzr-git).',
     branch_format='bzrlib.branch.BzrBranchFormat7',
     tree_format='bzrlib.workingtree.WorkingTreeFormat5',
-    experimental=True,
     )
 # The following two formats should always just be aliases.
 format_registry.register_metadir('development',
@@ -3407,6 +3410,28 @@
     hidden=True,
     experimental=True,
     )
+# These next two formats should be removed when the gc formats are
+# updated to use WorkingTreeFormat6 and are merged into bzr.dev
+format_registry.register_metadir('development-wt6',
+    'bzrlib.repofmt.pack_repo.RepositoryFormatKnitPack6',
+    help='1.14 with filtered views. '
+        'Please read '
+        'http://doc.bazaar-vcs.org/latest/developers/development-repo.html '
+        'before use.',
+    branch_format='bzrlib.branch.BzrBranchFormat7',
+    tree_format='bzrlib.workingtree.WorkingTreeFormat6',
+    hidden=True,
+    experimental=True,
+    )
+format_registry.register_metadir('development-wt6-rich-root',
+    'bzrlib.repofmt.pack_repo.RepositoryFormatKnitPack6RichRoot',
+    help='A variant of development-wt6 that supports rich-root data '
+         '(needed for bzr-svn and bzr-git).',
+    branch_format='bzrlib.branch.BzrBranchFormat7',
+    tree_format='bzrlib.workingtree.WorkingTreeFormat6',
+    hidden=True,
+    experimental=True,
+    )
 # The following format should be an alias for the rich root equivalent 
 # of the default format
 format_registry.register_metadir('default-rich-root',

=== modified file 'bzrlib/help_topics/__init__.py'
--- a/bzrlib/help_topics/__init__.py	2009-03-23 14:59:43 +0000
+++ b/bzrlib/help_topics/__init__.py	2009-03-28 01:27:54 +0000
@@ -651,10 +651,10 @@
   by default).
 
 * If you are using bzr-svn to interoperate with a Subversion
-  repository, use 1.9-rich-root.
+  repository, use 1.14-rich-root.
 
 * If you are working on a project with big trees (5000+ paths)
-  or deep history (5000+ revisions), use 1.9.
+  or deep history (5000+ revisions), use 1.14.
 
 * Otherwise, use the default format - it is good enough for
   most projects.
@@ -662,8 +662,8 @@
 If some of your developers are unable to use the most recent
 version of Bazaar (due to distro package availability say), be
 sure to adjust the guidelines above accordingly. For example,
-you may need to select 1.6 instead of 1.9 if your project has
-standardized on Bazaar 1.7.
+you may need to select 1.9 instead of 1.14 if your project has
+standardized on Bazaar 1.13.1 say.
 
 Note: Many of the currently supported formats have two variants:
 a plain one and a rich-root one. The latter include an additional

=== modified file 'bzrlib/tests/blackbox/test_add.py'
--- a/bzrlib/tests/blackbox/test_add.py	2009-03-23 14:59:43 +0000
+++ b/bzrlib/tests/blackbox/test_add.py	2009-03-31 14:12:27 +0000
@@ -34,7 +34,7 @@
         standard_tests, condition_isinstance(TestAdd))
     scenarios = [
         ('pre-views', {'branch_tree_format': 'pack-0.92'}),
-        ('view-aware', {'branch_tree_format': 'development-wt5'}),
+        ('view-aware', {'branch_tree_format': 'development-wt6'}),
         ]
     return multiply_tests(to_adapt, scenarios, result)
 

=== modified file 'bzrlib/tests/blackbox/test_filtered_view_ops.py'
--- a/bzrlib/tests/blackbox/test_filtered_view_ops.py	2009-03-28 02:10:54 +0000
+++ b/bzrlib/tests/blackbox/test_filtered_view_ops.py	2009-03-31 14:13:27 +0000
@@ -28,7 +28,7 @@
     def make_abc_tree_with_ab_view(self):
         # we need to use a specific format because the default format
         # doesn't support views yet
-        format = bzrdir.format_registry.make_bzrdir('development-wt5')
+        format = bzrdir.format_registry.make_bzrdir('development-wt6')
         wt = TestCaseWithTransport.make_branch_and_tree(self, '.',
             format=format)
         self.build_tree(['a', 'b', 'c'])
@@ -157,7 +157,7 @@
     def make_abc_tree_and_clone_with_ab_view(self):
         # we need to use a specific format because the default format
         # doesn't support views yet
-        format = bzrdir.format_registry.make_bzrdir('development-wt5')
+        format = bzrdir.format_registry.make_bzrdir('development-wt6')
         # Build the first tree
         wt1 = TestCaseWithTransport.make_branch_and_tree(self, 'tree_1',
             format=format)

=== modified file 'bzrlib/tests/blackbox/test_view.py'
--- a/bzrlib/tests/blackbox/test_view.py	2009-03-23 14:59:43 +0000
+++ b/bzrlib/tests/blackbox/test_view.py	2009-03-31 14:12:27 +0000
@@ -26,7 +26,7 @@
     def make_branch_and_tree(self):
         # we need to use a specific format because the default format
         # doesn't support views yet
-        format = bzrdir.format_registry.make_bzrdir('development-wt5')
+        format = bzrdir.format_registry.make_bzrdir('development-wt6')
         return TestCaseWithTransport.make_branch_and_tree(self, '.',
             format=format)
 

=== modified file 'bzrlib/tests/test_info.py'
--- a/bzrlib/tests/test_info.py	2009-03-23 14:59:43 +0000
+++ b/bzrlib/tests/test_info.py	2009-03-31 14:12:27 +0000
@@ -154,34 +154,38 @@
                     ' rich-root or rich-root-pack'
             elif key in ('knit', 'metaweave'):
                 expected = 'knit or metaweave'
-            elif key in ('development-wt5', 'development-wt5-rich-root'):
-                expected = 'development-wt5 or development-wt5-rich-root'
+            elif key in ('1.14', '1.14-rich-root'):
+                expected = '1.14 or 1.14-rich-root'
             self.assertCheckoutDescription(key, expected)
 
     def test_describe_branch_format(self):
         for key in bzrdir.format_registry.keys():
             if key in bzrdir.format_registry.aliases():
                 continue
+            if bzrdir.format_registry.get_info(key).hidden:
+                continue
             expected = None
             if key in ('dirstate', 'knit'):
                 expected = 'dirstate or knit'
-            elif key in ('1.9', 'development-wt5'):
-                expected = '1.9 or development-wt5'
-            elif key in ('1.9-rich-root', 'development-wt5-rich-root'):
-                expected = '1.9-rich-root or development-wt5-rich-root'
+            elif key in ('1.9', '1.14'):
+                expected = '1.14 or 1.9'
+            elif key in ('1.9-rich-root', '1.14-rich-root'):
+                expected = '1.14-rich-root or 1.9-rich-root'
             self.assertBranchDescription(key, expected)
 
     def test_describe_repo_format(self):
         for key in bzrdir.format_registry.keys():
             if key in bzrdir.format_registry.aliases():
                 continue
+            if bzrdir.format_registry.get_info(key).hidden:
+                continue
             expected = None
             if key in ('dirstate', 'knit', 'dirstate-tags'):
                 expected = 'dirstate or dirstate-tags or knit'
-            elif key in ('1.9', 'development-wt5'):
-                expected = '1.9 or development-wt5'
-            elif key in ('1.9-rich-root', 'development-wt5-rich-root'):
-                expected = '1.9-rich-root or development-wt5-rich-root'
+            elif key in ('1.9', '1.14'):
+                expected = '1.14 or 1.9'
+            elif key in ('1.9-rich-root', '1.14-rich-root'):
+                expected = '1.14-rich-root or 1.9-rich-root'
             self.assertRepoDescription(key, expected)
 
         format = bzrdir.format_registry.make_bzrdir('metaweave')

=== modified file 'bzrlib/transform.py'
--- a/bzrlib/transform.py	2009-03-23 14:59:43 +0000
+++ b/bzrlib/transform.py	2009-04-01 10:22:33 +0000
@@ -2152,6 +2152,7 @@
 def _create_files(tt, tree, desired_files, pb, offset, accelerator_tree,
                   hardlink):
     total = len(desired_files) + offset
+    wt = tt._tree
     if accelerator_tree is None:
         new_desired_files = desired_files
     else:
@@ -2171,8 +2172,8 @@
                                    trans_id)
             else:
                 contents = accelerator_tree.get_file(file_id, accelerator_path)
-                if tree.supports_content_filtering():
-                    filters = tree._content_filter_stack(tree_path)
+                if wt.supports_content_filtering():
+                    filters = wt._content_filter_stack(tree_path)
                     contents = filtered_output_bytes(contents, filters,
                         ContentFilterContext(tree_path, tree))
                 try:
@@ -2187,8 +2188,8 @@
         offset += count
     for count, ((trans_id, tree_path), contents) in enumerate(
             tree.iter_files_bytes(new_desired_files)):
-        if tree.supports_content_filtering():
-            filters = tree._content_filter_stack(tree_path)
+        if wt.supports_content_filtering():
+            filters = wt._content_filter_stack(tree_path)
             contents = filtered_output_bytes(contents, filters,
                 ContentFilterContext(tree_path, tree))
         tt.create_file(contents, trans_id)

=== modified file 'bzrlib/workingtree.py'
--- a/bzrlib/workingtree.py	2009-03-31 00:12:10 +0000
+++ b/bzrlib/workingtree.py	2009-03-31 14:13:27 +0000
@@ -80,7 +80,11 @@
 import bzrlib.branch
 from bzrlib.transport import get_transport
 import bzrlib.ui
-from bzrlib.workingtree_4 import WorkingTreeFormat4, WorkingTreeFormat5
+from bzrlib.workingtree_4 import (
+    WorkingTreeFormat4,
+    WorkingTreeFormat5,
+    WorkingTreeFormat6,
+    )
 """)
 
 from bzrlib import symbol_versioning
@@ -2982,6 +2986,7 @@
 
 __default_format = WorkingTreeFormat4()
 WorkingTreeFormat.register_format(__default_format)
+WorkingTreeFormat.register_format(WorkingTreeFormat6())
 WorkingTreeFormat.register_format(WorkingTreeFormat5())
 WorkingTreeFormat.register_format(WorkingTreeFormat3())
 WorkingTreeFormat.set_default_format(__default_format)

=== modified file 'bzrlib/workingtree_4.py'
--- a/bzrlib/workingtree_4.py	2009-03-31 00:12:10 +0000
+++ b/bzrlib/workingtree_4.py	2009-03-31 14:13:27 +0000
@@ -1337,10 +1337,19 @@
 
     This differs from WorkingTree4 by:
      - Supporting content filtering.
+
+    This is new in bzr 1.11.
+    """
+
+
+class WorkingTree6(DirStateWorkingTree):
+    """This is the Format 6 working tree.
+
+    This differs from WorkingTree5 by:
      - Supporting a current view that may mask the set of files in a tree
        impacted by most user operations.
 
-    This is new in bzr 1.11.
+    This is new in bzr 1.14.
     """
 
     def _make_views(self):
@@ -1490,7 +1499,7 @@
 
 
 class WorkingTreeFormat5(DirStateWorkingTreeFormat):
-    """WorkingTree format supporting views.
+    """WorkingTree format supporting content filtering.
     """
 
     upgrade_recommended = False
@@ -1505,6 +1514,26 @@
         """See WorkingTreeFormat.get_format_description()."""
         return "Working tree format 5"
 
+    def supports_content_filtering(self):
+        return True
+
+
+class WorkingTreeFormat6(DirStateWorkingTreeFormat):
+    """WorkingTree format supporting views.
+    """
+
+    upgrade_recommended = False
+
+    _tree_class = WorkingTree6
+
+    def get_format_string(self):
+        """See WorkingTreeFormat.get_format_string()."""
+        return "Bazaar Working Tree Format 6 (bzr 1.14)\n"
+
+    def get_format_description(self):
+        """See WorkingTreeFormat.get_format_description()."""
+        return "Working tree format 6"
+
     def _init_custom_control_files(self, wt):
         """Subclasses with custom control files should override this method."""
         wt._transport.put_bytes('views', '', mode=wt.bzrdir._get_file_mode())
@@ -2105,6 +2134,29 @@
         # tree during upgrade.
         tree._control_files.lock_write()
         try:
+            self.update_format(tree)
+        finally:
+            tree._control_files.unlock()
+
+    def update_format(self, tree):
+        """Change the format marker."""
+        tree._transport.put_bytes('format',
+            self.target_format.get_format_string(),
+            mode=tree.bzrdir._get_file_mode())
+
+
+class Converter4or5to6(object):
+    """Perform an in-place upgrade of format 4 or 5 to format 6 trees."""
+
+    def __init__(self):
+        self.target_format = WorkingTreeFormat6()
+
+    def convert(self, tree):
+        # lock the control files not the tree, so that we don't get tree
+        # on-unlock behaviours, and so that no-one else diddles with the
+        # tree during upgrade.
+        tree._control_files.lock_write()
+        try:
             self.init_custom_control_files(tree)
             self.update_format(tree)
         finally:

=== modified file 'doc/en/user-guide/filtered_views.txt'
--- a/doc/en/user-guide/filtered_views.txt	2009-02-27 01:11:27 +0000
+++ b/doc/en/user-guide/filtered_views.txt	2009-03-31 14:12:27 +0000
@@ -27,8 +27,8 @@
 
 Note: Bazaar's default format does not yet support filtered views. That
 is likely to change in the near future. To use filtered views in the
-meantime, you currently need to upgrade to ``development-wt5`` (or
-``development-wt5-rich-root``) format first.
+meantime, you currently need to upgrade to ``development-wt6`` (or
+``development-wt6-rich-root``) format first.
 
 
 Creating a view




More information about the bazaar-commits mailing list