Rev 4978: (igc) Hide most storage formats in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Thu Jan 21 05:55:20 GMT 2010


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

------------------------------------------------------------
revno: 4978 [merge]
revision-id: pqm at pqm.ubuntu.com-20100121055517-y5ngh2uifz7ua7we
parent: pqm at pqm.ubuntu.com-20100121024310-y0jq14xdry72ktxl
parent: ian.clatworthy at canonical.com-20100121052004-683zrfjejl2yr0yf
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2010-01-21 05:55:17 +0000
message:
  (igc) Hide most storage formats
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  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
=== modified file 'NEWS'
--- a/NEWS	2010-01-20 23:26:31 +0000
+++ b/NEWS	2010-01-21 05:20:04 +0000
@@ -138,6 +138,9 @@
   ``try``/``finally`` blocks where applicable as it is simpler and more
   robust.  (Andrew Bennetts)
 
+* All except a small number of storage formats are now hidden, making
+  the help for numerous commands far more digestible. (Ian Clatworthy)
+
 * Attempts to open a shared repository as a branch (e.g. ``bzr branch
   path/to/repo``) will now include "location is a repository" as a hint in
   the error message.  (Brian de Alwis, Andrew Bennetts, #440952)

=== modified file 'bzrlib/bzrdir.py'
--- a/bzrlib/bzrdir.py	2010-01-12 02:48:41 +0000
+++ b/bzrlib/bzrdir.py	2010-01-20 23:28:35 +0000
@@ -3714,18 +3714,21 @@
 format_registry.register('weave', BzrDirFormat6,
     'Pre-0.8 format.  Slower than knit and does not'
     ' support checkouts or shared repositories.',
+    hidden=True,
     deprecated=True)
 format_registry.register_metadir('metaweave',
     'bzrlib.repofmt.weaverepo.RepositoryFormat7',
     'Transitional format in 0.8.  Slower than knit.',
     branch_format='bzrlib.branch.BzrBranchFormat5',
     tree_format='bzrlib.workingtree.WorkingTreeFormat3',
+    hidden=True,
     deprecated=True)
 format_registry.register_metadir('knit',
     'bzrlib.repofmt.knitrepo.RepositoryFormatKnit1',
     'Format using knits.  Recommended for interoperation with bzr <= 0.14.',
     branch_format='bzrlib.branch.BzrBranchFormat5',
     tree_format='bzrlib.workingtree.WorkingTreeFormat3',
+    hidden=True,
     deprecated=True)
 format_registry.register_metadir('dirstate',
     'bzrlib.repofmt.knitrepo.RepositoryFormatKnit1',
@@ -3735,6 +3738,7 @@
     # this uses bzrlib.workingtree.WorkingTreeFormat4 because importing
     # directly from workingtree_4 triggers a circular import.
     tree_format='bzrlib.workingtree.WorkingTreeFormat4',
+    hidden=True,
     deprecated=True)
 format_registry.register_metadir('dirstate-tags',
     'bzrlib.repofmt.knitrepo.RepositoryFormatKnit1',
@@ -3743,6 +3747,7 @@
         ' Incompatible with bzr < 0.15.',
     branch_format='bzrlib.branch.BzrBranchFormat6',
     tree_format='bzrlib.workingtree.WorkingTreeFormat4',
+    hidden=True,
     deprecated=True)
 format_registry.register_metadir('rich-root',
     'bzrlib.repofmt.knitrepo.RepositoryFormatKnit4',
@@ -3750,6 +3755,7 @@
         ' bzr < 1.0.',
     branch_format='bzrlib.branch.BzrBranchFormat6',
     tree_format='bzrlib.workingtree.WorkingTreeFormat4',
+    hidden=True,
     deprecated=True)
 format_registry.register_metadir('dirstate-with-subtree',
     'bzrlib.repofmt.knitrepo.RepositoryFormatKnit3',
@@ -3791,6 +3797,7 @@
          '(needed for bzr-svn and bzr-git).',
     branch_format='bzrlib.branch.BzrBranchFormat6',
     tree_format='bzrlib.workingtree.WorkingTreeFormat4',
+    hidden=True,
     )
 format_registry.register_metadir('1.6',
     'bzrlib.repofmt.pack_repo.RepositoryFormatKnitPack5',
@@ -3799,6 +3806,7 @@
          'not present locally.',
     branch_format='bzrlib.branch.BzrBranchFormat7',
     tree_format='bzrlib.workingtree.WorkingTreeFormat4',
+    hidden=True,
     )
 format_registry.register_metadir('1.6.1-rich-root',
     'bzrlib.repofmt.pack_repo.RepositoryFormatKnitPack5RichRoot',
@@ -3806,6 +3814,7 @@
          '(needed for bzr-svn and bzr-git).',
     branch_format='bzrlib.branch.BzrBranchFormat7',
     tree_format='bzrlib.workingtree.WorkingTreeFormat4',
+    hidden=True,
     )
 format_registry.register_metadir('1.9',
     'bzrlib.repofmt.pack_repo.RepositoryFormatKnitPack6',
@@ -3814,6 +3823,7 @@
          'performance for most operations.',
     branch_format='bzrlib.branch.BzrBranchFormat7',
     tree_format='bzrlib.workingtree.WorkingTreeFormat4',
+    hidden=True,
     )
 format_registry.register_metadir('1.9-rich-root',
     'bzrlib.repofmt.pack_repo.RepositoryFormatKnitPack6RichRoot',
@@ -3821,6 +3831,7 @@
          '(needed for bzr-svn and bzr-git).',
     branch_format='bzrlib.branch.BzrBranchFormat7',
     tree_format='bzrlib.workingtree.WorkingTreeFormat4',
+    hidden=True,
     )
 format_registry.register_metadir('1.14',
     'bzrlib.repofmt.pack_repo.RepositoryFormatKnitPack6',
@@ -3848,6 +3859,7 @@
     tree_format='bzrlib.workingtree.WorkingTreeFormat6',
     experimental=True,
     alias=True,
+    hidden=True,
     )
 format_registry.register_metadir('development-subtree',
     'bzrlib.repofmt.pack_repo.RepositoryFormatPackDevelopment2Subtree',
@@ -3860,6 +3872,7 @@
     branch_format='bzrlib.branch.BzrBranchFormat7',
     tree_format='bzrlib.workingtree.WorkingTreeFormat6',
     experimental=True,
+    hidden=True,
     alias=False, # Restore to being an alias when an actual development subtree format is added
                  # This current non-alias status is simply because we did not introduce a
                  # chk based subtree format.
@@ -3909,6 +3922,7 @@
     branch_format='bzrlib.branch.BzrBranchFormat7',
     tree_format='bzrlib.workingtree.WorkingTreeFormat6',
     alias=True,
+    hidden=True,
     help='Same as 2a.')
 
 # The current format that is made on 'bzr init'.

=== modified file 'bzrlib/tests/blackbox/test_info.py'
--- a/bzrlib/tests/blackbox/test_info.py	2009-09-17 11:54:41 +0000
+++ b/bzrlib/tests/blackbox/test_info.py	2010-01-20 23:28:35 +0000
@@ -37,7 +37,7 @@
 
     def setUp(self):
         ExternalBase.setUp(self)
-        self._repo_strings = "2a or development-subtree"
+        self._repo_strings = "2a"
 
     def test_info_non_existing(self):
         self.vfs_transport_factory = MemoryServer

=== modified file 'bzrlib/tests/test_info.py'
--- a/bzrlib/tests/test_info.py	2009-04-08 16:33:19 +0000
+++ b/bzrlib/tests/test_info.py	2010-01-20 23:28:35 +0000
@@ -143,15 +143,11 @@
                 # We don't require that experimental formats support checkouts
                 # or describe correctly in the UI.
                 continue
+            if bzrdir.format_registry.get_info(key).hidden:
+                continue
             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.1-rich-root',
-                '1.9', '1.9-rich-root'):
-                expected = '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'
+            if key in ('pack-0.92'):
+                expected = 'pack-0.92'
             elif key in ('knit', 'metaweave'):
                 expected = 'knit or metaweave'
             elif key in ('1.14', '1.14-rich-root'):
@@ -167,10 +163,10 @@
             expected = None
             if key in ('dirstate', 'knit'):
                 expected = 'dirstate or knit'
-            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'
+            elif key in ('1.14'):
+                expected = '1.14'
+            elif key in ('1.14-rich-root'):
+                expected = '1.14-rich-root'
             self.assertBranchDescription(key, expected)
 
     def test_describe_repo_format(self):
@@ -182,10 +178,10 @@
             expected = None
             if key in ('dirstate', 'knit', 'dirstate-tags'):
                 expected = 'dirstate or dirstate-tags or knit'
-            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'
+            elif key in ('1.14'):
+                expected = '1.14'
+            elif key in ('1.14-rich-root'):
+                expected = '1.14-rich-root'
             self.assertRepoDescription(key, expected)
 
         format = bzrdir.format_registry.make_bzrdir('metaweave')




More information about the bazaar-commits mailing list