Rev 2941: renaming of experimental pack formats to include knitpack in their name (Ian Clatworthy) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Thu Oct 25 09:29:10 BST 2007
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 2941
revision-id: pqm at pqm.ubuntu.com-20071025082908-abn3kunrb2ivdvth
parent: pqm at pqm.ubuntu.com-20071025022746-ftudwmzir8v2lccc
parent: ian.clatworthy at internode.on.net-20071025073432-jyhg4g4amhq22q0c
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2007-10-25 09:29:08 +0100
message:
renaming of experimental pack formats to include knitpack in their name (Ian Clatworthy)
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_bzrdir.py test_bzrdir.py-20060131065654-deba40eef51cf220
bzrlib/tests/test_info.py test_info.py-20070320150933-m0xxm1g7xi9v6noe-1
bzrlib/tests/test_repository.py test_repository.py-20060131075918-65c555b881612f4d
------------------------------------------------------------
revno: 2940.1.2
merged: ian.clatworthy at internode.on.net-20071025073432-jyhg4g4amhq22q0c
parent: ian.clatworthy at internode.on.net-20071025062437-z33vk6gnklueq2xc
parent: ian.clatworthy at internode.on.net-20071025073319-je0q1mcbh0mtnetl
committer: Ian Clatworthy <ian.clatworthy at internode.on.net>
branch nick: ianc-integration
timestamp: Thu 2007-10-25 17:34:32 +1000
message:
renaming of experimental pack formats to include knitpack in their name (Ian Clatworthy)
------------------------------------------------------------
revno: 2939.2.7
merged: ian.clatworthy at internode.on.net-20071025073319-je0q1mcbh0mtnetl
parent: ian.clatworthy at internode.on.net-20071025061757-mak2y7k5u0qgffkj
committer: Ian Clatworthy <ian.clatworthy at internode.on.net>
branch nick: bzr.pack-naming
timestamp: Thu 2007-10-25 17:33:19 +1000
message:
fix strings used in on-disk unit tests
------------------------------------------------------------
revno: 2940.1.1
merged: ian.clatworthy at internode.on.net-20071025062437-z33vk6gnklueq2xc
parent: pqm at pqm.ubuntu.com-20071025022746-ftudwmzir8v2lccc
parent: ian.clatworthy at internode.on.net-20071025061757-mak2y7k5u0qgffkj
committer: Ian Clatworthy <ian.clatworthy at internode.on.net>
branch nick: ianc-integration
timestamp: Thu 2007-10-25 16:24:37 +1000
message:
renaming of experimental pack formats to include knitpack in their name (Ian Clatworthy)
------------------------------------------------------------
revno: 2939.2.6
merged: ian.clatworthy at internode.on.net-20071025061757-mak2y7k5u0qgffkj
parent: ian.clatworthy at internode.on.net-20071025045732-pa2fqvj0hdjppmxj
committer: Ian Clatworthy <ian.clatworthy at internode.on.net>
branch nick: bzr.pack-naming
timestamp: Thu 2007-10-25 16:17:57 +1000
message:
more review feedback from lifeless and poolie
------------------------------------------------------------
revno: 2939.2.5
merged: ian.clatworthy at internode.on.net-20071025045732-pa2fqvj0hdjppmxj
parent: ian.clatworthy at internode.on.net-20071025022110-ujojf3vbeneiqnkh
committer: Ian Clatworthy <ian.clatworthy at internode.on.net>
branch nick: bzr.pack-naming
timestamp: Thu 2007-10-25 14:57:32 +1000
message:
review feedback from lifeless
------------------------------------------------------------
revno: 2939.2.4
merged: ian.clatworthy at internode.on.net-20071025022110-ujojf3vbeneiqnkh
parent: ian.clatworthy at internode.on.net-20071025020619-2yr1xxxz227xza1y
committer: Ian Clatworthy <ian.clatworthy at internode.on.net>
branch nick: bzr.pack-naming
timestamp: Thu 2007-10-25 12:21:10 +1000
message:
update NEWS
------------------------------------------------------------
revno: 2939.2.3
merged: ian.clatworthy at internode.on.net-20071025020619-2yr1xxxz227xza1y
parent: ian.clatworthy at internode.on.net-20071025015555-u126vma8knfv19ao
committer: Ian Clatworthy <ian.clatworthy at internode.on.net>
branch nick: bzr.pack-naming
timestamp: Thu 2007-10-25 12:06:19 +1000
message:
add tests for experimental formats including help content checking
------------------------------------------------------------
revno: 2939.2.2
merged: ian.clatworthy at internode.on.net-20071025015555-u126vma8knfv19ao
parent: ian.clatworthy at internode.on.net-20071025014326-io36rmp4643lopto
committer: Ian Clatworthy <ian.clatworthy at internode.on.net>
branch nick: bzr.pack-naming
timestamp: Thu 2007-10-25 11:55:55 +1000
message:
allow bzrdir formats to be registered as experimental
------------------------------------------------------------
revno: 2939.2.1
merged: ian.clatworthy at internode.on.net-20071025014326-io36rmp4643lopto
parent: pqm at pqm.ubuntu.com-20071024231045-lquhgsz9513gn2l4
committer: Ian Clatworthy <ian.clatworthy at internode.on.net>
branch nick: bzr.pack-naming
timestamp: Thu 2007-10-25 11:43:26 +1000
message:
use 'knitpack' naming instead of 'experimental' for pack formats
=== modified file 'NEWS'
--- a/NEWS 2007-10-24 17:19:20 +0000
+++ b/NEWS 2007-10-25 06:17:57 +0000
@@ -30,6 +30,18 @@
FEATURES:
+ * New ``knitpack-experimental`` repository format. This is interoperable with
+ the ``dirstate-tags`` format but uses a smarter storage design that greatly
+ speeds up many operations, both local and remote. This new format can be
+ used as an option to the ``init``, ``init-repository`` and ``upgrade``
+ commands. See http://doc.bazaar-vcs.org/latest/developers/knitpack.html
+ for further details. (Robert Collins)
+
+ * For users of bzr-svn (and those testing the prototype subtree support) that
+ wish to try packs, a new ``knitpack-subtree-experimental`` format has also
+ been added. This is interoperable with the ``dirstate-subtrees`` format.
+ (Robert Collins)
+
* New ``reconfigure`` command. (Aaron Bentley)
* New ``revert --forget-merges`` command, which removes the record of a pending
@@ -90,6 +102,9 @@
* Show encodings, locale and list of plugins in the traceback message.
(Martin Pool, #63894)
+ * Experimental directory formats can now be marked with
+ ``experimental = True`` during registration. (Ian Clatworthy)
+
DOCUMENTATION:
* New *Bazaar in Five Minutes* guide. (Matthew Revell)
=== modified file 'bzrlib/bzrdir.py'
--- a/bzrlib/bzrdir.py 2007-10-23 06:57:05 +0000
+++ b/bzrlib/bzrdir.py 2007-10-25 06:17:57 +0000
@@ -2293,10 +2293,11 @@
class BzrDirFormatInfo(object):
- def __init__(self, native, deprecated, hidden):
+ def __init__(self, native, deprecated, hidden, experimental):
self.deprecated = deprecated
self.native = native
self.hidden = hidden
+ self.experimental = experimental
class BzrDirFormatRegistry(registry.Registry):
@@ -2310,7 +2311,8 @@
repository_format, help, native=True, deprecated=False,
branch_format=None,
tree_format=None,
- hidden=False):
+ hidden=False,
+ experimental=False):
"""Register a metadir subformat.
These all use a BzrDirMetaFormat1 bzrdir, but can be parameterized
@@ -2348,10 +2350,11 @@
if repository_format is not None:
bd.repository_format = _load(repository_format)
return bd
- self.register(key, helper, help, native, deprecated, hidden)
+ self.register(key, helper, help, native, deprecated, hidden,
+ experimental)
def register(self, key, factory, help, native=True, deprecated=False,
- hidden=False):
+ hidden=False, experimental=False):
"""Register a BzrDirFormat factory.
The factory must be a callable that takes one parameter: the key.
@@ -2361,12 +2364,12 @@
supplied directly.
"""
registry.Registry.register(self, key, factory, help,
- BzrDirFormatInfo(native, deprecated, hidden))
+ BzrDirFormatInfo(native, deprecated, hidden, experimental))
def register_lazy(self, key, module_name, member_name, help, native=True,
- deprecated=False, hidden=False):
+ deprecated=False, hidden=False, experimental=False):
registry.Registry.register_lazy(self, key, module_name, member_name,
- help, BzrDirFormatInfo(native, deprecated, hidden))
+ help, BzrDirFormatInfo(native, deprecated, hidden, experimental))
def set_default(self, key):
"""Set the 'default' key to be a clone of the supplied key.
@@ -2419,14 +2422,22 @@
output += wrapped(default_realkey, '(default) %s' % default_help,
self.get_info('default'))
deprecated_pairs = []
+ experimental_pairs = []
for key, help in help_pairs:
info = self.get_info(key)
if info.hidden:
continue
elif info.deprecated:
deprecated_pairs.append((key, help))
+ elif info.experimental:
+ experimental_pairs.append((key, help))
else:
output += wrapped(key, help, info)
+ if len(experimental_pairs) > 0:
+ output += "Experimental formats are shown below.\n\n"
+ for key, help in experimental_pairs:
+ info = self.get_info(key)
+ output += wrapped(key, help, info)
if len(deprecated_pairs) > 0:
output += "Deprecated formats are shown below.\n\n"
for key, help in deprecated_pairs:
@@ -2478,24 +2489,27 @@
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
hidden=True,
)
-format_registry.register_metadir('experimental',
+format_registry.register_metadir('knitpack-experimental',
'bzrlib.repofmt.pack_repo.RepositoryFormatKnitPack1',
- help='New in XXX: Experimental format with data compatible with dirstate '
- 'format repositories. Cannot be read except with bzr.dev. '
- 'WARNING: This format is unstable and data in it will not be upgradable'
- ' to release formats of bzr.',
+ help='New in 0.92: Pack-based format with data compatible with '
+ 'dirstate-tags format repositories. Interoperates with '
+ 'bzr repositories before 0.92 but cannot be read by bzr < 0.92. '
+ 'NOTE: This format is experimental. Before using it, please read '
+ 'http://doc.bazaar-vcs.org/latest/developers/knitpack.html.',
branch_format='bzrlib.branch.BzrBranchFormat6',
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
- hidden=True,
+ experimental=True,
)
-format_registry.register_metadir('experimental-subtree',
+format_registry.register_metadir('knitpack-subtree-experimental',
'bzrlib.repofmt.pack_repo.RepositoryFormatKnitPack3',
- help='New in XXX: Experimental format with data compatible with '
- 'dirstate-with-subtree format repositories. Cannot be read except with'
- ' bzr.dev. WARNING: This format is unstable and data in it will not be'
- ' upgradable to release formats of bzr.',
+ help='New in 0.92: Pack-based format with data compatible with '
+ 'dirstate-with-subtree format repositories. Interoperates with '
+ 'bzr repositories before 0.92 but cannot be read by bzr < 0.92. '
+ 'NOTE: This format is experimental. Before using it, please read '
+ 'http://doc.bazaar-vcs.org/latest/developers/knitpack.html.',
branch_format='bzrlib.branch.BzrBranchFormat6',
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
hidden=True,
+ experimental=True,
)
format_registry.set_default('dirstate-tags')
=== modified file 'bzrlib/repofmt/pack_repo.py'
--- a/bzrlib/repofmt/pack_repo.py 2007-10-24 22:24:40 +0000
+++ b/bzrlib/repofmt/pack_repo.py 2007-10-25 06:17:57 +0000
@@ -1660,7 +1660,7 @@
class RepositoryFormatKnitPack1(RepositoryFormatPack):
"""A no-subtrees parameterised Pack repository.
- This format was introduced in bzr.dev.
+ This format was introduced in 0.92.
"""
repository_class = KnitPackRepository
@@ -1668,7 +1668,7 @@
_serializer = xml5.serializer_v5
def _get_matching_bzrdir(self):
- return bzrdir.format_registry.make_bzrdir('experimental')
+ return bzrdir.format_registry.make_bzrdir('knitpack-experimental')
def _ignore_setting_bzrdir(self, format):
pass
@@ -1677,11 +1677,11 @@
def get_format_string(self):
"""See RepositoryFormat.get_format_string()."""
- return "Bazaar Experimental no-subtrees\n"
+ return "Bazaar pack repository format 1 (needs bzr 0.92)\n"
def get_format_description(self):
"""See RepositoryFormat.get_format_description()."""
- return "Experimental no-subtrees"
+ return "Packs containing knits without subtree support"
def check_conversion_target(self, target_format):
pass
@@ -1694,7 +1694,7 @@
- support for recording full info about the tree root
- support for recording tree-references
- This format was introduced in bzr.dev.
+ This format was introduced in 0.92.
"""
repository_class = KnitPackRepository
@@ -1704,7 +1704,8 @@
_serializer = xml7.serializer_v7
def _get_matching_bzrdir(self):
- return bzrdir.format_registry.make_bzrdir('experimental-subtree')
+ return bzrdir.format_registry.make_bzrdir(
+ 'knitpack-subtree-experimental')
def _ignore_setting_bzrdir(self, format):
pass
@@ -1721,8 +1722,8 @@
def get_format_string(self):
"""See RepositoryFormat.get_format_string()."""
- return "Bazaar Experimental subtrees\n"
+ return "Bazaar pack repository format 1 with subtree support (needs bzr 0.92)\n"
def get_format_description(self):
"""See RepositoryFormat.get_format_description()."""
- return "Experimental subtrees\n"
+ return "Packs containing knits with subtree support\n"
=== modified file 'bzrlib/repository.py'
--- a/bzrlib/repository.py 2007-10-24 05:59:51 +0000
+++ b/bzrlib/repository.py 2007-10-25 06:17:57 +0000
@@ -1968,16 +1968,16 @@
'RepositoryFormatKnit3',
)
-# Experimental formats. These make no guarantee about data stability.
-# There is one format for pre-subtrees, and one for post-subtrees to
-# allow ease of testing.
+# Pack-based formats. There is one format for pre-subtrees, and one for
+# post-subtrees to allow ease of testing.
+# NOTE: These are experimental in 0.92.
format_registry.register_lazy(
- 'Bazaar Experimental no-subtrees\n',
+ 'Bazaar pack repository format 1 (needs bzr 0.92)\n',
'bzrlib.repofmt.pack_repo',
'RepositoryFormatKnitPack1',
)
format_registry.register_lazy(
- 'Bazaar Experimental subtrees\n',
+ 'Bazaar pack repository format 1 with subtree support (needs bzr 0.92)\n',
'bzrlib.repofmt.pack_repo',
'RepositoryFormatKnitPack3',
)
=== modified file 'bzrlib/tests/blackbox/test_info.py'
--- a/bzrlib/tests/blackbox/test_info.py 2007-10-04 05:50:44 +0000
+++ b/bzrlib/tests/blackbox/test_info.py 2007-10-25 04:57:32 +0000
@@ -263,7 +263,7 @@
branch5 = tree5.branch
out, err = self.run_bzr('info -v lightcheckout')
self.assertEqualDiff(
-"""Lightweight checkout (format: dirstate or dirstate-tags)
+"""Lightweight checkout (format: dirstate or dirstate-tags or knitpack-experimental)
Location:
light checkout root: lightcheckout
checkout of branch: standalone
@@ -441,7 +441,7 @@
# Out of date lightweight checkout
out, err = self.run_bzr('info lightcheckout --verbose')
self.assertEqualDiff(
-"""Lightweight checkout (format: dirstate or dirstate-tags)
+"""Lightweight checkout (format: dirstate or dirstate-tags or knitpack-experimental)
Location:
light checkout root: lightcheckout
checkout of branch: standalone
@@ -579,7 +579,7 @@
datestring_first = format_date(rev.timestamp, rev.timezone)
out, err = self.run_bzr('info tree/lightcheckout --verbose')
self.assertEqualDiff(
-"""Lightweight checkout (format: dirstate or dirstate-tags)
+"""Lightweight checkout (format: dirstate or dirstate-tags or knitpack-experimental)
Location:
light checkout root: tree/lightcheckout
checkout of branch: repo/branch
@@ -710,7 +710,7 @@
datestring_last = format_date(rev.timestamp, rev.timezone)
out, err = self.run_bzr('info tree/lightcheckout --verbose')
self.assertEqualDiff(
-"""Lightweight checkout (format: dirstate or dirstate-tags)
+"""Lightweight checkout (format: dirstate or dirstate-tags or knitpack-experimental)
Location:
light checkout root: tree/lightcheckout
checkout of branch: repo/branch
@@ -1149,7 +1149,7 @@
(False, True): 'Lightweight checkout',
(False, False): 'Checkout',
}[(shared_repo is not None, light_checkout)]
- format = {True: 'dirstate or dirstate-tags',
+ format = {True: 'dirstate or dirstate-tags or knitpack-experimental',
False: 'dirstate'}[light_checkout]
if repo_locked or branch_locked or tree_locked:
def locked_message(a_bool):
=== modified file 'bzrlib/tests/test_bzrdir.py'
--- a/bzrlib/tests/test_bzrdir.py 2007-09-18 07:14:35 +0000
+++ b/bzrlib/tests/test_bzrdir.py 2007-10-25 02:06:19 +0000
@@ -93,7 +93,8 @@
'branch6',
'bzrlib.repofmt.knitrepo.RepositoryFormatKnit3',
'Experimental successor to knit. Use at your own risk.',
- branch_format='bzrlib.branch.BzrBranchFormat6')
+ branch_format='bzrlib.branch.BzrBranchFormat6',
+ experimental=True)
my_format_registry.register_metadir(
'hidden format',
'bzrlib.repofmt.knitrepo.RepositoryFormatKnit3',
@@ -140,10 +141,13 @@
topics.register('formats', self.make_format_registry().help_topic,
'Directory formats')
topic = topics.get_detail('formats')
- new, deprecated = topic.split('Deprecated formats')
+ new, rest = topic.split('Experimental formats')
+ experimental, deprecated = rest.split('Deprecated formats')
self.assertContainsRe(new, 'These formats can be used')
self.assertContainsRe(new,
':knit:\n \(native\) \(default\) Format using knits\n')
+ self.assertContainsRe(experimental,
+ ':branch6:\n \(native\) Experimental successor to knit')
self.assertContainsRe(deprecated,
':lazy:\n \(native\) Format registered lazily\n')
self.assertNotContainsRe(new, 'hidden')
=== modified file 'bzrlib/tests/test_info.py'
--- a/bzrlib/tests/test_info.py 2007-10-04 22:00:07 +0000
+++ b/bzrlib/tests/test_info.py 2007-10-25 04:57:32 +0000
@@ -138,8 +138,9 @@
# these are typically hidden or aliases for other formats
continue
expected = None
- if key in ('dirstate', 'dirstate-tags', 'dirstate-with-subtree'):
- expected = 'dirstate or dirstate-tags'
+ if key in ('dirstate', 'dirstate-tags', 'dirstate-with-subtree',
+ 'knitpack-experimental', 'knitpack-subtree-experimental'):
+ expected = 'dirstate or dirstate-tags or knitpack-experimental'
if key in ('knit', 'metaweave'):
expected = 'knit or metaweave'
self.assertCheckoutDescription(key, expected)
=== modified file 'bzrlib/tests/test_repository.py'
--- a/bzrlib/tests/test_repository.py 2007-10-25 01:43:27 +0000
+++ b/bzrlib/tests/test_repository.py 2007-10-25 07:34:32 +0000
@@ -762,10 +762,10 @@
empty_repo.abort_write_group()
-class TestExperimentalNoSubtrees(TestCaseWithTransport):
+class TestKnitPackNoSubtrees(TestCaseWithTransport):
def get_format(self):
- return bzrdir.format_registry.make_bzrdir('experimental')
+ return bzrdir.format_registry.make_bzrdir('knitpack-experimental')
def test_disk_layout(self):
format = self.get_format()
@@ -780,7 +780,8 @@
self.check_databases(t)
def check_format(self, t):
- self.assertEqualDiff('Bazaar Experimental no-subtrees\n',
+ self.assertEqualDiff(
+ "Bazaar pack repository format 1 (needs bzr 0.92)\n",
t.get('format').read())
def assertHasKndx(self, t, knit_name):
@@ -1084,20 +1085,22 @@
self.assertRaises(errors.LockBroken, repo._pack_collection._unlock_names)
-class TestExperimentalSubtrees(TestExperimentalNoSubtrees):
+class TestKnitPackSubtrees(TestKnitPackNoSubtrees):
def get_format(self):
- return bzrdir.format_registry.make_bzrdir('experimental-subtree')
+ return bzrdir.format_registry.make_bzrdir(
+ 'knitpack-subtree-experimental')
def check_format(self, t):
- self.assertEqualDiff('Bazaar Experimental subtrees\n',
- t.get('format').read())
+ self.assertEqualDiff(
+ "Bazaar pack repository format 1 with subtree support (needs bzr 0.92)\n",
+ t.get('format').read())
class TestRepositoryPackCollection(TestCaseWithTransport):
def get_format(self):
- return bzrdir.format_registry.make_bzrdir('experimental')
+ return bzrdir.format_registry.make_bzrdir('knitpack-experimental')
def test__max_pack_count(self):
"""The maximum pack count is a function of the number of revisions."""
More information about the bazaar-commits
mailing list