Rev 3226: (robertc) Add development formats and methodology. (Robert Collins) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Tue Feb 19 01:40:54 GMT 2008
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 3226
revision-id:pqm at pqm.ubuntu.com-20080219014045-w3igijttjdcpwshz
parent: pqm at pqm.ubuntu.com-20080218234410-0w6zg2617n24of1m
parent: robertc at robertcollins.net-20080213221140-0h6pxt7zdm7af20d
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2008-02-19 01:40:45 +0000
message:
(robertc) Add development formats and methodology. (Robert Collins)
added:
doc/developers/development-repo.txt developmentrepo.txt-20080102200205-raj42k61dch8pjmj-1
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/bzrdir.py bzrdir.py-20060131065624-156dfea39c4387cb
bzrlib/info.py info.py-20050323235939-6bbfe7d9700b0b9b
bzrlib/repofmt/pack_repo.py pack_repo.py-20070813041115-gjv5ma7ktfqwsjgn-1
bzrlib/repository.py rev_storage.py-20051111201905-119e9401e46257e3
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: 3152.2.3
revision-id:robertc at robertcollins.net-20080213221140-0h6pxt7zdm7af20d
parent: robertc at robertcollins.net-20080106200422-x8yz6cxotlzltvwp
parent: pqm at pqm.ubuntu.com-20080213062701-74mocrhfz0n4uj4r
committer: Robert Collins <robertc at robertcollins.net>
branch nick: experimental
timestamp: Thu 2008-02-14 09:11:40 +1100
message:
Merge up with bzr.dev.
removed:
bzrlib/plugins/multiparent.py mpregen-20070411063203-5x9z7i73add0d6f6-1
added:
bzrlib/tests/repository_implementations/test_has_revisions.py test_has_revisions.p-20080111035443-xaupgdsx5fw1q54b-1
bzrlib/tests/test_http_implementations.py test_http_implementa-20071218210003-65nh81gglcfvurw6-1
contrib/bzr_access bzr_access-20071210163004-c9lb1renhra2ncg0-1
doc/developers/inventory.txt inventory.txt-20080103013957-opkrhxy6lmywmx4i-1
doc/developers/lca-merge.txt lcamerge.txt-20080103061803-9isydn4ivgwrvorw-1
doc/en/user-guide/revnos.txt revnos.txt-20080111231928-pbntxea0ynh9ww1t-1
renamed:
bzrlib/tests/HTTPTestUtil.py => bzrlib/tests/http_utils.py HTTPTestUtil.py-20050914180604-247d3aafb7a43343
bzrlib/tests/HttpServer.py => bzrlib/tests/http_server.py httpserver.py-20061012142527-m1yxdj1xazsf8d7s-1
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
README README-20050309040720-8f368abf9f346b9d
bzr bzr.py-20050313053754-5485f144c7006fa6
bzrlib/__init__.py __init__.py-20050309040759-33e65acf91bbcd5d
bzrlib/annotate.py annotate.py-20050922133147-7c60541d2614f022
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/bugtracker.py bugtracker.py-20070410073305-vu1vu1qosjurg8kb-1
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/bundle/commands.py __init__.py-20050617152058-1b6530d9ab85c11c
bzrlib/bzrdir.py bzrdir.py-20060131065624-156dfea39c4387cb
bzrlib/commands.py bzr.py-20050309040720-d10f4714595cf8c3
bzrlib/conflicts.py conflicts.py-20051001061850-78ef952ba63d2b42
bzrlib/debug.py debug.py-20061102062349-vdhrw9qdpck8cl35-1
bzrlib/delta.py delta.py-20050729221636-54cf14ef94783d0a
bzrlib/diff.py diff.py-20050309040759-26944fbbf2ebbf36
bzrlib/dirstate.py dirstate.py-20060728012006-d6mvoihjb3je9peu-1
bzrlib/doc/api/__init__.py __init__.py-20051224020744-7b87d590843855bc
bzrlib/errors.py errors.py-20050309040759-20512168c4e14fbd
bzrlib/fetch.py fetch.py-20050818234941-26fea6105696365d
bzrlib/graph.py graph_walker.py-20070525030359-y852guab65d4wtn0-1
bzrlib/help_topics/__init__.py help_topics.py-20060920210027-rnim90q9e0bwxvy4-1
bzrlib/help_topics/en/conflicts.txt conflicts.txt-20070723221841-ns3jvwxdb4okn6fk-1
bzrlib/inventory.py inventory.py-20050309040759-6648b84ca2005b37
bzrlib/knit.py knit.py-20051212171256-f056ac8f0fbe1bd9
bzrlib/merge.py merge.py-20050513021216-953b65a438527106
bzrlib/option.py option.py-20051014052914-661fb36e76e7362f
bzrlib/osutils.py osutils.py-20050309040759-eeaff12fbf77ac86
bzrlib/plugin.py plugin.py-20050622060424-829b654519533d69
bzrlib/plugins/launchpad/__init__.py __init__.py-20060315182712-2d5feebd2a1032dc
bzrlib/plugins/launchpad/lp_indirect.py lp_indirect.py-20070126012204-de5rugwlt22c7u7e-1
bzrlib/plugins/launchpad/lp_registration.py lp_registration.py-20060315190948-daa617eafe3a8d48
bzrlib/plugins/launchpad/test_lp_indirect.py test_lp_indirect.py-20070126002743-oyle362tzv9cd8mi-1
bzrlib/plugins/launchpad/test_register.py test_register.py-20060315182712-40f5dda945c829a8
bzrlib/progress.py progress.py-20050610070202-df9faaab791964c0
bzrlib/reconfigure.py reconfigure.py-20070908040425-6ykgo7escxhyrg9p-1
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/repofmt/knitrepo.py knitrepo.py-20070206081537-pyy4a00xdas0j4pf-1
bzrlib/repofmt/pack_repo.py pack_repo.py-20070813041115-gjv5ma7ktfqwsjgn-1
bzrlib/repofmt/weaverepo.py presplitout.py-20070125045333-wfav3tsh73oxu3zk-1
bzrlib/repository.py rev_storage.py-20051111201905-119e9401e46257e3
bzrlib/revisiontree.py revisiontree.py-20060724012533-bg8xyryhxd0o0i0h-1
bzrlib/smart/client.py client.py-20061116014825-2k6ada6xgulslami-1
bzrlib/smart/medium.py medium.py-20061103051856-rgu2huy59fkz902q-1
bzrlib/smart/protocol.py protocol.py-20061108035435-ot0lstk2590yqhzr-1
bzrlib/smart/repository.py repository.py-20061128022038-vr5wy5bubyb8xttk-1
bzrlib/smart/request.py request.py-20061108095550-gunadhxmzkdjfeek-1
bzrlib/smart/vfs.py vfs.py-20061108095550-gunadhxmzkdjfeek-2
bzrlib/status.py status.py-20050505062338-431bfa63ec9b19e6
bzrlib/symbol_versioning.py symbol_versioning.py-20060105104851-9ecf8af605d15a80
bzrlib/tests/TestUtil.py TestUtil.py-20050824080200-5f70140a2d938694
bzrlib/tests/__init__.py selftest.py-20050531073622-8d0e3c8845c97a64
bzrlib/tests/blackbox/test_annotate.py testannotate.py-20051013044000-457f44801bfa9d39
bzrlib/tests/blackbox/test_bundle_info.py test_bundle_info.py-20070816181255-eiuodwxuqu7w7gxf-1
bzrlib/tests/blackbox/test_diff.py test_diff.py-20060110203741-aa99ac93e633d971
bzrlib/tests/blackbox/test_ignore.py test_ignore.py-20060703063225-4tm8dc2pa7wwg2t3-1
bzrlib/tests/blackbox/test_log.py test_log.py-20060112090212-78f6ea560c868e24
bzrlib/tests/blackbox/test_merge.py test_merge.py-20060323225809-9bc0459c19917f41
bzrlib/tests/blackbox/test_outside_wt.py test_outside_wt.py-20060116200058-98edd33e7db8bdde
bzrlib/tests/blackbox/test_pull.py test_pull.py-20051201144907-64959364f629947f
bzrlib/tests/blackbox/test_selftest.py test_selftest.py-20060123024542-01c5f1bbcb596d78
bzrlib/tests/blackbox/test_too_much.py blackbox.py-20050620052131-a7370d756399f615
bzrlib/tests/blackbox/test_version_info.py test_bb_version_info.py-20051228204928-91711c6559d952f7
bzrlib/tests/branch_implementations/test_branch.py testbranch.py-20050711070244-121d632bc37d7253
bzrlib/tests/branch_implementations/test_http.py test_http.py-20060731224648-2eef7ae5yja95rya-1
bzrlib/tests/branch_implementations/test_parent.py test_parent.py-20050830052751-5e62766623c32222
bzrlib/tests/interrepository_implementations/test_interrepository.py test_interrepository.py-20060220061411-1ec13fa99e5e3eee
bzrlib/tests/inventory_implementations/__init__.py __init__.py-20070821044532-olbadbokgv3qv1yd-1
bzrlib/tests/repository_implementations/__init__.py __init__.py-20060131092037-9564957a7d4a841b
bzrlib/tests/repository_implementations/test_repository.py test_repository.py-20060131092128-ad07f494f5c9d26c
bzrlib/tests/test_annotate.py test_annotate.py-20061213215015-sttc9agsxomls7q0-1
bzrlib/tests/test_bundle.py test.py-20050630184834-092aa401ab9f039c
bzrlib/tests/test_bzrdir.py test_bzrdir.py-20060131065654-deba40eef51cf220
bzrlib/tests/test_conflicts.py test_conflicts.py-20051006031059-e2dad9bbeaa5891f
bzrlib/tests/test_diff.py testdiff.py-20050727164403-d1a3496ebb12e339
bzrlib/tests/test_dirstate.py test_dirstate.py-20060728012006-d6mvoihjb3je9peu-2
bzrlib/tests/test_errors.py test_errors.py-20060210110251-41aba2deddf936a8
bzrlib/tests/test_fetch.py testfetch.py-20050825090644-f73e07e7dfb1765a
bzrlib/tests/test_graph.py test_graph_walker.py-20070525030405-enq4r60hhi9xrujc-1
bzrlib/tests/test_http.py testhttp.py-20051018020158-b2eef6e867c514d9
bzrlib/tests/test_http_response.py test_http_response.py-20060628233143-950b2a482a32505d
bzrlib/tests/test_log.py testlog.py-20050728115707-1a514809d7d49309
bzrlib/tests/test_merge.py testmerge.py-20050905070950-c1b5aa49ff911024
bzrlib/tests/test_merge_core.py test_merge_core.py-20050824132511-eb99b23a0eec641b
bzrlib/tests/test_nonascii.py testnonascii.py-20051018022645-ea1d8b6477b058a6
bzrlib/tests/test_osutils.py test_osutils.py-20051201224856-e48ee24c12182989
bzrlib/tests/test_plugins.py plugins.py-20050622075746-32002b55e5e943e9
bzrlib/tests/test_progress.py test_progress.py-20060308160359-978c397bc79b7fda
bzrlib/tests/test_reconfigure.py test_reconfigure.py-20070908040425-6ykgo7escxhyrg9p-2
bzrlib/tests/test_remote.py test_remote.py-20060720103555-yeeg2x51vn0rbtdp-2
bzrlib/tests/test_repository.py test_repository.py-20060131075918-65c555b881612f4d
bzrlib/tests/test_revert.py test_revert.py-20060828180832-fqb1v6ecpyvnlitj-1
bzrlib/tests/test_revisionnamespaces.py testrevisionnamespaces.py-20050711050225-8b4af89e6b1efe84
bzrlib/tests/test_selftest.py test_selftest.py-20051202044319-c110a115d8c0456a
bzrlib/tests/test_sftp_transport.py testsftp.py-20051027032739-247570325fec7e7e
bzrlib/tests/test_smart.py test_smart.py-20061122024551-ol0l0o0oofsu9b3t-2
bzrlib/tests/test_smart_transport.py test_ssh_transport.py-20060608202016-c25gvf1ob7ypbus6-2
bzrlib/tests/test_trace.py testtrace.py-20051110225523-a21117fc7a07eeff
bzrlib/tests/test_transform.py test_transaction.py-20060105172520-b3ffb3946550e6c4
bzrlib/tests/test_transport.py testtransport.py-20050718175618-e5cdb99f4555ddce
bzrlib/tests/test_transport_implementations.py test_transport_implementations.py-20051227111451-f97c5c7d5c49fce7
bzrlib/tests/test_tsort.py testtsort.py-20051025073946-27da871c394d5be4
bzrlib/tests/test_urlutils.py test_urlutils.py-20060502192900-46b1f9579987cf9c
bzrlib/tests/test_version_info.py test_version_info.py-20051228204928-2c364e30b702b41b
bzrlib/tests/test_versionedfile.py test_versionedfile.py-20060222045249-db45c9ed14a1c2e5
bzrlib/tests/test_win32utils.py test_win32utils.py-20070713181630-8xsrjymd3e8mgw23-108
bzrlib/tests/test_workingtree_4.py test_workingtree_4.p-20070223025758-531n3tznl3zacv2o-1
bzrlib/tests/workingtree_implementations/test_rename_one.py test_rename_one.py-20070226161242-2d8ibdedl700jgio-1
bzrlib/trace.py trace.py-20050309040759-c8ed824bdcd4748a
bzrlib/transform.py transform.py-20060105172343-dd99e54394d91687
bzrlib/transport/__init__.py transport.py-20050711165921-4978aa7ce1285ad5
bzrlib/transport/http/__init__.py http_transport.py-20050711212304-506c5fd1059ace96
bzrlib/transport/http/_pycurl.py pycurlhttp.py-20060110060940-4e2a705911af77a6
bzrlib/transport/http/_urllib.py _urlgrabber.py-20060113083826-0bbf7d992fbf090c
bzrlib/transport/http/_urllib2_wrappers.py _urllib2_wrappers.py-20060913231729-ha9ugi48ktx481ao-1
bzrlib/transport/http/response.py _response.py-20060613154423-a2ci7hd4iw5c7fnt-1
bzrlib/transport/remote.py ssh.py-20060608202016-c25gvf1ob7ypbus6-1
bzrlib/tree.py tree.py-20050309040759-9d5f2496be663e77
bzrlib/tsort.py tsort.py-20051025073946-7808f6aaf7d07208
bzrlib/urlutils.py urlutils.py-20060502195429-e8a161ecf8fac004
bzrlib/version_info_formats/format_custom.py format_custom.py-20071029100350-ajovqhbpb5khf6gu-1
bzrlib/versionedfile.py versionedfile.py-20060222045106-5039c71ee3b65490
bzrlib/workingtree_4.py workingtree_4.py-20070208044105-5fgpc5j3ljlh5q6c-1
bzrlib/xml_serializer.py xml.py-20050309040759-57d51586fdec365d
doc/developers/HACKING.txt HACKING-20050805200004-2a5dc975d870f78c
doc/developers/index.txt index.txt-20070508041241-qznziunkg0nffhiw-1
doc/en/tutorials/using_bazaar_with_launchpad.txt using_bazaar_with_lp-20071211073140-7msh8uf9a9h4y9hb-1
doc/en/user-guide/bug_trackers.txt bug_trackers.txt-20070713223459-khxdlcudraii95uv-1
doc/en/user-guide/controlling_registration.txt controlling_registra-20071121073725-0corxykv5irjal00-3
doc/en/user-guide/core_concepts.txt core_concepts.txt-20071114035000-q36a9h57ps06uvnl-2
doc/en/user-guide/index.txt index.txt-20060622101119-tgwtdci8z769bjb9-2
tools/rst2html.py rst2html.py-20060817120932-gn177u8v0008txhu-1
bzrlib/tests/http_utils.py HTTPTestUtil.py-20050914180604-247d3aafb7a43343
bzrlib/tests/http_server.py httpserver.py-20061012142527-m1yxdj1xazsf8d7s-1
------------------------------------------------------------
revno: 3152.2.2
revision-id:robertc at robertcollins.net-20080106200422-x8yz6cxotlzltvwp
parent: robertc at robertcollins.net-20080102223046-h8nxufr1v21pnei2
committer: Robert Collins <robertc at robertcollins.net>
branch nick: experimental
timestamp: Mon 2008-01-07 07:04:22 +1100
message:
The bzrdir format registry now accepts an ``alias`` keyword to
register_metadir, used to indicate that a format name is an alias for
some other format and thus should not be reported when describing the
format. (Robert Collins)
-------------- This line and the fmllowing will be ignored --------------
modified:
NEWS
bzrlib/bzrdir.py
bzrlib/info.py
bzrlib/tests/test_bzrdir.py
bzrlib/tests/test_info.py
=== modified file 'NEWS'
--- a/NEWS 2008-01-02 22:30:46 +0000
+++ b/NEWS 2008-01-06 20:04:15 +0000
@@ -135,6 +135,11 @@
* Patience Diff now supports arbitrary python objects, as long as they
support ``hash()``. (John Arbash Meinel)
+ * The bzrdir format registry now accepts an ``alias`` keyword to
+ register_metadir, used to indicate that a format name is an alias for
+ some other format and thus should not be reported when describing the
+ format. (Robert Collins)
+
API BREAKS:
TESTING:
=== modified file 'bzrlib/bzrdir.py'
--- a/bzrlib/bzrdir.py 2008-01-02 22:30:46 +0000
+++ b/bzrlib/bzrdir.py 2008-01-06 19:41:29 +0000
@@ -2447,12 +2447,22 @@
e.g. BzrDirMeta1 with weave repository. Also, it's more user-oriented.
"""
+ def __init__(self):
+ """Create a BzrDirFormatRegistry."""
+ self._aliases = set()
+ super(BzrDirFormatRegistry, self).__init__()
+
+ def aliases(self):
+ """Return a set of the format names which are aliases."""
+ return frozenset(self._aliases)
+
def register_metadir(self, key,
repository_format, help, native=True, deprecated=False,
branch_format=None,
tree_format=None,
hidden=False,
- experimental=False):
+ experimental=False,
+ alias=False):
"""Register a metadir subformat.
These all use a BzrDirMetaFormat1 bzrdir, but can be parameterized
@@ -2491,10 +2501,10 @@
bd.repository_format = _load(repository_format)
return bd
self.register(key, helper, help, native, deprecated, hidden,
- experimental)
+ experimental, alias)
def register(self, key, factory, help, native=True, deprecated=False,
- hidden=False, experimental=False):
+ hidden=False, experimental=False, alias=False):
"""Register a BzrDirFormat factory.
The factory must be a callable that takes one parameter: the key.
@@ -2505,11 +2515,15 @@
"""
registry.Registry.register(self, key, factory, help,
BzrDirFormatInfo(native, deprecated, hidden, experimental))
+ if alias:
+ self._aliases.add(key)
def register_lazy(self, key, module_name, member_name, help, native=True,
- deprecated=False, hidden=False, experimental=False):
+ deprecated=False, hidden=False, experimental=False, alias=False):
registry.Registry.register_lazy(self, key, module_name, member_name,
help, BzrDirFormatInfo(native, deprecated, hidden, experimental))
+ if alias:
+ self._aliases.add(key)
def set_default(self, key):
"""Set the 'default' key to be a clone of the supplied key.
@@ -2518,6 +2532,7 @@
"""
registry.Registry.register(self, 'default', self.get(key),
self.get_help(key), info=self.get_info(key))
+ self._aliases.add('default')
def set_default_repository(self, key):
"""Set the FormatRegistry default and Repository default.
@@ -2670,6 +2685,7 @@
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
hidden=False,
)
+# The following two formats should always just be aliases.
format_registry.register_metadir('development',
'bzrlib.repofmt.pack_repo.RepositoryFormatPackDevelopment0',
help='Current development format. Can convert data to and from pack-0.92 '
@@ -2681,6 +2697,7 @@
branch_format='bzrlib.branch.BzrBranchFormat6',
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
experimental=True,
+ alias=True,
)
format_registry.register_metadir('development-subtree',
'bzrlib.repofmt.pack_repo.RepositoryFormatPackDevelopment0Subtree',
@@ -2693,7 +2710,9 @@
branch_format='bzrlib.branch.BzrBranchFormat6',
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
experimental=True,
+ alias=True,
)
+# And the development formats which the will have aliased one of follow:
format_registry.register_metadir('development0',
'bzrlib.repofmt.pack_repo.RepositoryFormatPackDevelopment0',
help='Trivial rename of pack-0.92 to provide a development format. '
=== modified file 'bzrlib/info.py'
--- a/bzrlib/info.py 2007-11-06 09:00:25 +0000
+++ b/bzrlib/info.py 2008-01-06 20:01:30 +0000
@@ -440,7 +440,9 @@
tree.bzrdir.root_transport.base):
branch = None
repository = None
- for key in bzrdir.format_registry.keys():
+ non_aliases = set(bzrdir.format_registry.keys())
+ non_aliases.difference_update(bzrdir.format_registry.aliases())
+ for key in non_aliases:
format = bzrdir.format_registry.make_bzrdir(key)
if isinstance(format, bzrdir.BzrDirMetaFormat1):
if (tree and format.workingtree_format !=
@@ -457,11 +459,12 @@
candidates.append(key)
if len(candidates) == 0:
return 'unnamed'
- new_candidates = [c for c in candidates if c != 'default']
- if len(new_candidates) > 0:
- candidates = new_candidates
+ candidates.sort()
new_candidates = [c for c in candidates if not
bzrdir.format_registry.get_info(c).hidden]
if len(new_candidates) > 0:
+ # If there are any non-hidden formats that match, only return those to
+ # avoid listing hidden formats except when only a hidden format will
+ # do.
candidates = new_candidates
return ' or '.join(candidates)
=== modified file 'bzrlib/tests/test_bzrdir.py'
--- a/bzrlib/tests/test_bzrdir.py 2007-12-21 20:32:22 +0000
+++ b/bzrlib/tests/test_bzrdir.py 2008-01-06 19:45:00 +0000
@@ -170,6 +170,16 @@
finally:
bzrdir.format_registry.set_default_repository(old_default)
+ def test_aliases(self):
+ a_registry = bzrdir.BzrDirFormatRegistry()
+ a_registry.register('weave', bzrdir.BzrDirFormat6,
+ 'Pre-0.8 format. Slower and does not support checkouts or shared'
+ ' repositories', deprecated=True)
+ a_registry.register('weavealias', bzrdir.BzrDirFormat6,
+ 'Pre-0.8 format. Slower and does not support checkouts or shared'
+ ' repositories', deprecated=True, alias=True)
+ self.assertEqual(frozenset(['weavealias']), a_registry.aliases())
+
class SampleBranch(bzrlib.branch.Branch):
"""A dummy branch for guess what, dummy use."""
=== modified file 'bzrlib/tests/test_info.py'
--- a/bzrlib/tests/test_info.py 2007-11-26 13:55:51 +0000
+++ b/bzrlib/tests/test_info.py 2008-01-06 20:02:10 +0000
@@ -126,16 +126,22 @@
def test_describe_tree_format(self):
for key in bzrdir.format_registry.keys():
- if key == 'default':
+ if key in bzrdir.format_registry.aliases():
continue
self.assertTreeDescription(key)
def test_describe_checkout_format(self):
for key in bzrdir.format_registry.keys():
- if key in ('default', 'weave', 'experimental'):
- continue
- if key.startswith('experimental-'):
- # these are typically hidden or aliases for other formats
+ if key in bzrdir.format_registry.aliases():
+ # Aliases will not describe correctly in the UI because the
+ # real format is found.
+ continue
+ # legacy: weave does not support checkouts
+ if key == 'weave':
+ continue
+ if bzrdir.format_registry.get_info(key).experimental:
+ # We don't require that experimental formats support checkouts
+ # or describe correctly in the UI.
continue
expected = None
if key in ('dirstate', 'dirstate-tags', 'dirstate-with-subtree',
@@ -149,7 +155,7 @@
def test_describe_branch_format(self):
for key in bzrdir.format_registry.keys():
- if key == 'default':
+ if key in bzrdir.format_registry.aliases():
continue
expected = None
if key in ('dirstate', 'knit'):
@@ -158,7 +164,7 @@
def test_describe_repo_format(self):
for key in bzrdir.format_registry.keys():
- if key == 'default':
+ if key in bzrdir.format_registry.aliases():
continue
expected = None
if key in ('dirstate', 'knit', 'dirstate-tags'):
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/bzrdir.py bzrdir.py-20060131065624-156dfea39c4387cb
bzrlib/info.py info.py-20050323235939-6bbfe7d9700b0b9b
bzrlib/tests/test_bzrdir.py test_bzrdir.py-20060131065654-deba40eef51cf220
bzrlib/tests/test_info.py test_info.py-20070320150933-m0xxm1g7xi9v6noe-1
------------------------------------------------------------
revno: 3152.2.1
revision-id:robertc at robertcollins.net-20080102223046-h8nxufr1v21pnei2
parent: pqm at pqm.ubuntu.com-20080102154906-hqiq6x2eammznjtg
committer: Robert Collins <robertc at robertcollins.net>
branch nick: experimental
timestamp: Thu 2008-01-03 09:30:46 +1100
message:
* A new repository format 'development' has been added. This format will
represent the latest 'in-progress' format that the bzr developers are
interested in getting early-adopter testing and feedback on.
``doc/developers/development-repo.txt`` has detailed information.
(Robert Collins)
added:
doc/developers/development-repo.txt developmentrepo.txt-20080102200205-raj42k61dch8pjmj-1
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/test_repository.py test_repository.py-20060131075918-65c555b881612f4d
=== added file 'doc/developers/development-repo.txt'
--- a/doc/developers/development-repo.txt 1970-01-01 00:00:00 +0000
+++ b/doc/developers/development-repo.txt 2008-01-02 22:30:46 +0000
@@ -0,0 +1,246 @@
+==============================
+Development repository formats
+==============================
+
+.. contents::
+
+Using development repository formats
+====================================
+
+Motivation
+----------
+
+We believe that we can continue to gain substantial performance benefits
+by altering the repository storage in bzr. The more feedback we can get
+on the changes during the development process the better.
+
+To make it possible to get more feedback we are going to expose the
+current development formats to the users of our development trunk
+'bzr.dev'. The technical details of the individual formats are at the
+end of this document.
+
+Format names
+------------
+
+The current development format will be called 'development'. Each time
+the development format changes, the prior development format will be
+renamed to e.g. 'development0', 'development1' etc.
+
+When a release of bzr is done, all the older numbered development
+formats will be removed from 'bzr.dev', so we will not be carrying the
+code for them around indefinately.
+
+Support for upgrade and migration
+---------------------------------
+
+The preservation and renaming policy makes it quite safe for users to
+test out development formats (though we cannot guarantee bugs of course
+- it is development code):
+
+ - users of a given development format can always get back onto regular
+ formats by switching to the next bzr released version which is
+ guaranteed to be able to upgrade from that development format.
+ - users that routinely use bzr.dev should upgrade to the most recent
+ development version available before pulling in bzr.dev changes
+ around release time, as that is when old format cleanups will occur.
+
+We cannot guarantee backwards compatability though, because some of the
+planned work may be 'upgrade only'. Please see ``bzr help formats`` for
+the text of the 'development' format which will indicate its
+compatability with other formats if you need to interoperate with
+users or services that do not have bzr.dev.
+
+Before converting to a development format
+-----------------------------------------
+
+Run a ``bzr check`` with the version of bzr that you will be using.
+``bzr check`` gets updated as we find new things that are inconsistent
+with existing repositories. While only a small number of repositories
+are likely to have any given error, it is best to check just in case.
+
+If ``bzr check`` reports a problem, run this command::
+
+ bzr reconcile
+
+Note that reconcile can take many hours, particularly if you are
+reconciling one of the 'knit' or 'dirstate' format repositories. If you
+have such a repository, consider upgrading it to 'pack-0.92' first,
+which will perform reconcile significantly faster.
+
+Creating a new development format branch
+----------------------------------------
+
+If you're starting a project from scratch, it's easy to make it a
+``development`` one. Here's how::
+
+ cd my-stuff
+ bzr init --development
+ bzr add
+ bzr commit -m "initial import"
+
+In other words, use the normal sequence of commands but add the
+``--development`` option to the ``init`` command.
+
+
+Creating a new development format repository
+--------------------------------------------
+
+If you're starting a project from scratch and wish to use a shared repository
+for branches, you can make it a ``development`` repository like this::
+
+ cd my-repo
+ bzr init-repo --development .
+ cd my-stuff
+ bzr init
+ bzr add
+ bzr commit -m "initial import"
+
+In other words, use the normal sequence of commands but add the
+``--development`` option to the ``init-repo`` command.
+
+Upgrading an existing branch or repository to development
+---------------------------------------------------------
+
+If you have an existing branch and wish to migrate it to
+a ``development`` format, use the ``upgrade`` command like this::
+
+ bzr upgrade --development path-to-my-branch
+
+If you are using a shared repository, run::
+
+ bzr upgrade --development ROOT_OF_REPOSITORY
+
+to upgrade the history database. Note that this will not
+alter the branch format of each branch, so
+you will need to also upgrade each branch individually
+if you are upgrading from an old (e.g. < 0.17) bzr.
+More modern bzr's will already have the branch format at
+our latest branch format which adds support for tags.
+
+Starting a new development format branch from one in an older format
+--------------------------------------------------------------------
+
+This can be done in one of several ways:
+
+1. Create a new branch and pull into it
+2. Create a standalone branch and upgrade its format
+3. Create a knitpack shared repository and branch into it
+
+Here are the commands for using the ``pull`` approach::
+
+ bzr init --development my-new-branch
+ cd my-new-branch
+ bzr pull my-source-branch
+
+Here are the commands for using the ``upgrade`` approach::
+
+ bzr branch my-source-branch my-new-branch
+ cd my-new-branch
+ bzr upgrade --development .
+
+Here are the commands for the shared repository approach::
+
+ cd my-repo
+ bzr init-repo --development .
+ bzr branch my-source-branch my-new-branch
+ cd my-new-branch
+
+As a reminder, any of the above approaches can fail if the source branch
+has inconsistent data within it and hasn't been reconciled yet. Please
+be sure to check that before reporting problems.
+
+Develoment formats for bzr-svn users
+------------------------------------
+
+If you are using ``bzr-svn`` or are testing the prototype subtree support,
+you can still use and assist in testing the development formats. The
+commands to use are identical to the ones given above except that the
+name of the format to use is ``development-subtree``.
+
+**WARNING**: Note that bzr only supports one-way conversion **to** the
+subtree format ``development-subtree``. Once you are using
+``development-subtree`` you cannot pull or merge back into a regular
+format such as ``pack-0.92``, ``development`` etc.
+
+The ``development-subtree`` format is required for the bzr-svn
+plug-in but should otherwise not be used until the subtree feature is
+complete within bzr.
+
+Reporting problems
+------------------
+
+If you need any help or encounter any problems, please contact the developers
+via the usual ways, i.e. chat to us on IRC or send a message to our mailing
+list. See http://bazaar-vcs.org/BzrSupport for contact details.
+
+
+Technical notes
+===============
+
+When to create a new development format
+---------------------------------------
+
+Whenever a code change will result in incorrect behaviour with existing
+``development`` repositories. Changes in push/pull/init/commit/merge
+have all been known to do this in the past.
+
+How to create a new development format
+--------------------------------------
+
+1. Register two new formats with the next available sequence number.
+ e.g. ``development1`` and ``development1-subtree``. (You can see the
+ ``development0`` format for an example.
+ These should:
+
+ * Use your new development repository/branch/tree classes
+ * Have really bare bones help - something like 'changes X to be Y
+ see ...developers/development-repo.html'
+ * Be hidden and experimental.
+2. Change the repository class (or branch or tree) in the
+ ``development`` and ``development-subtree`` formats to point to the
+ new class you are creating.
+3. Add a new development format (and tests!). Repository formats are in
+ ``bzrlib.repofmt``. You probably want to reproduce the current
+ development format from ``bzrlib.repofmt.pack_repo`` with just new
+ disk format strings, ``_get_matching_bzrdir`` and help.
+4. Alter any other things that do class based tests. The easiest way
+ to find these is a grep for Development in bzrlib - and please
+ refactor as you find these to reduce the relevance this step has,
+ as it should not need to exist.
+5. Now subclass/create from scratch/whatever the live object code you
+ need to change to introduce your new format. Keep in mind that
+ eventually it will become the default format, so please don't keep
+ subclassing the last releases code, rather consider making the last
+ releases code a subclass of your new code (if there is a lot in
+ common) so that we can eventually remove that format once it becomes
+ ancient (or relegate it to a plugin).
+6. Once you have made the changes that required a new disk format, you
+ should submit the resulting branch to be merged. Other changes - to
+ take advantage of whatever new feature you have added - should be
+ sent in separately, because the disk level changes are a contention
+ point between multiple developers.
+
+Format Details
+==============
+
+development
+-----------
+
+Currently an alias for Development0
+
+development-subtree
+-------------------
+
+Currently an alias for Development0Subtree
+
+Development0[Subtree]
+---------------------
+
+These formats exists solely to provide an actual new format for the
+feature of 'development formats' to be introduced. They are regular
+pack-0.92 style formats with no changes to the disk storage other than
+the version marker.
+
+
+..
+ vim: tw=72 ft=rst expandtab
=== modified file 'NEWS'
--- a/NEWS 2008-02-13 03:25:53 +0000
+++ b/NEWS 2008-02-13 22:11:40 +0000
@@ -11,6 +11,12 @@
CHANGES:
+ * A new repository format 'development' has been added. This format will
+ represent the latest 'in-progress' format that the bzr developers are
+ interested in getting early-adopter testing and feedback on.
+ ``doc/developers/development-repo.txt`` has detailed information.
+ (Robert Collins)
+
FEATURES:
IMPROVEMENTS:
@@ -23,6 +29,11 @@
INTERNALS:
+ * The bzrdir format registry now accepts an ``alias`` keyword to
+ register_metadir, used to indicate that a format name is an alias for
+ some other format and thus should not be reported when describing the
+ format. (Robert Collins)
+
bzr 1.2rc1 (not released yet)
-----------------------------
=== modified file 'bzrlib/bzrdir.py'
--- a/bzrlib/bzrdir.py 2008-02-04 03:50:39 +0000
+++ b/bzrlib/bzrdir.py 2008-02-13 22:11:40 +0000
@@ -2447,12 +2447,22 @@
e.g. BzrDirMeta1 with weave repository. Also, it's more user-oriented.
"""
+ def __init__(self):
+ """Create a BzrDirFormatRegistry."""
+ self._aliases = set()
+ super(BzrDirFormatRegistry, self).__init__()
+
+ def aliases(self):
+ """Return a set of the format names which are aliases."""
+ return frozenset(self._aliases)
+
def register_metadir(self, key,
repository_format, help, native=True, deprecated=False,
branch_format=None,
tree_format=None,
hidden=False,
- experimental=False):
+ experimental=False,
+ alias=False):
"""Register a metadir subformat.
These all use a BzrDirMetaFormat1 bzrdir, but can be parameterized
@@ -2491,10 +2501,10 @@
bd.repository_format = _load(repository_format)
return bd
self.register(key, helper, help, native, deprecated, hidden,
- experimental)
+ experimental, alias)
def register(self, key, factory, help, native=True, deprecated=False,
- hidden=False, experimental=False):
+ hidden=False, experimental=False, alias=False):
"""Register a BzrDirFormat factory.
The factory must be a callable that takes one parameter: the key.
@@ -2503,21 +2513,26 @@
This function mainly exists to prevent the info object from being
supplied directly.
"""
- registry.Registry.register(self, key, factory, help,
+ registry.Registry.register(self, key, factory, help,
BzrDirFormatInfo(native, deprecated, hidden, experimental))
+ if alias:
+ self._aliases.add(key)
def register_lazy(self, key, module_name, member_name, help, native=True,
- deprecated=False, hidden=False, experimental=False):
- registry.Registry.register_lazy(self, key, module_name, member_name,
+ deprecated=False, hidden=False, experimental=False, alias=False):
+ registry.Registry.register_lazy(self, key, module_name, member_name,
help, BzrDirFormatInfo(native, deprecated, hidden, experimental))
+ if alias:
+ self._aliases.add(key)
def set_default(self, key):
"""Set the 'default' key to be a clone of the supplied key.
This method must be called once and only once.
"""
- registry.Registry.register(self, 'default', self.get(key),
+ registry.Registry.register(self, 'default', self.get(key),
self.get_help(key), info=self.get_info(key))
+ self._aliases.add('default')
def set_default_repository(self, key):
"""Set the FormatRegistry default and Repository default.
@@ -2669,4 +2684,54 @@
branch_format='bzrlib.branch.BzrBranchFormat6',
tree_format='bzrlib.workingtree.WorkingTreeFormat4',
)
+# The following two formats should always just be aliases.
+format_registry.register_metadir('development',
+ 'bzrlib.repofmt.pack_repo.RepositoryFormatPackDevelopment0',
+ help='Current development format. Can convert data to and from pack-0.92 '
+ '(and anything compatible with pack-0.92) format repositories. '
+ 'Repositories in this format can only be read by bzr.dev. '
+ 'Please read '
+ 'http://doc.bazaar-vcs.org/latest/developers/development-repo.html '
+ 'before use.',
+ branch_format='bzrlib.branch.BzrBranchFormat6',
+ tree_format='bzrlib.workingtree.WorkingTreeFormat4',
+ experimental=True,
+ alias=True,
+ )
+format_registry.register_metadir('development-subtree',
+ 'bzrlib.repofmt.pack_repo.RepositoryFormatPackDevelopment0Subtree',
+ help='Current development format, subtree variant. Can convert data to and '
+ 'from pack-0.92 (and anything compatible with pack-0.92) format '
+ 'repositories. Repositories in this format can only be read by '
+ 'bzr.dev. Please read '
+ 'http://doc.bazaar-vcs.org/latest/developers/development-repo.html '
+ 'before use.',
+ branch_format='bzrlib.branch.BzrBranchFormat6',
+ tree_format='bzrlib.workingtree.WorkingTreeFormat4',
+ experimental=True,
+ alias=True,
+ )
+# And the development formats which the will have aliased one of follow:
+format_registry.register_metadir('development0',
+ 'bzrlib.repofmt.pack_repo.RepositoryFormatPackDevelopment0',
+ help='Trivial rename of pack-0.92 to provide a development format. '
+ 'Please read '
+ 'http://doc.bazaar-vcs.org/latest/developers/development-repo.html '
+ 'before use.',
+ branch_format='bzrlib.branch.BzrBranchFormat6',
+ tree_format='bzrlib.workingtree.WorkingTreeFormat4',
+ hidden=True,
+ experimental=True,
+ )
+format_registry.register_metadir('development0-subtree',
+ 'bzrlib.repofmt.pack_repo.RepositoryFormatPackDevelopment0Subtree',
+ help='Trivial rename of pack-0.92-subtree to provide a development format. '
+ 'Please read '
+ 'http://doc.bazaar-vcs.org/latest/developers/development-repo.html '
+ 'before use.',
+ branch_format='bzrlib.branch.BzrBranchFormat6',
+ tree_format='bzrlib.workingtree.WorkingTreeFormat4',
+ hidden=True,
+ experimental=True,
+ )
format_registry.set_default('pack-0.92')
=== modified file 'bzrlib/info.py'
--- a/bzrlib/info.py 2007-11-06 09:00:25 +0000
+++ b/bzrlib/info.py 2008-01-06 20:04:22 +0000
@@ -440,7 +440,9 @@
tree.bzrdir.root_transport.base):
branch = None
repository = None
- for key in bzrdir.format_registry.keys():
+ non_aliases = set(bzrdir.format_registry.keys())
+ non_aliases.difference_update(bzrdir.format_registry.aliases())
+ for key in non_aliases:
format = bzrdir.format_registry.make_bzrdir(key)
if isinstance(format, bzrdir.BzrDirMetaFormat1):
if (tree and format.workingtree_format !=
@@ -457,11 +459,12 @@
candidates.append(key)
if len(candidates) == 0:
return 'unnamed'
- new_candidates = [c for c in candidates if c != 'default']
- if len(new_candidates) > 0:
- candidates = new_candidates
+ candidates.sort()
new_candidates = [c for c in candidates if not
bzrdir.format_registry.get_info(c).hidden]
if len(new_candidates) > 0:
+ # If there are any non-hidden formats that match, only return those to
+ # avoid listing hidden formats except when only a hidden format will
+ # do.
candidates = new_candidates
return ' or '.join(candidates)
=== modified file 'bzrlib/repofmt/pack_repo.py'
--- a/bzrlib/repofmt/pack_repo.py 2008-01-11 03:54:51 +0000
+++ b/bzrlib/repofmt/pack_repo.py 2008-02-13 22:11:40 +0000
@@ -2249,3 +2249,80 @@
def get_format_description(self):
"""See RepositoryFormat.get_format_description()."""
return "Packs containing knits with rich root support\n"
+
+
+class RepositoryFormatPackDevelopment0(RepositoryFormatPack):
+ """A no-subtrees development repository.
+
+ This format should be retained until the second release after bzr 1.0.
+
+ No changes to the disk behaviour from pack-0.92.
+ """
+
+ repository_class = KnitPackRepository
+ _commit_builder_class = PackCommitBuilder
+ _serializer = xml5.serializer_v5
+
+ def _get_matching_bzrdir(self):
+ return bzrdir.format_registry.make_bzrdir('development0')
+
+ def _ignore_setting_bzrdir(self, format):
+ pass
+
+ _matchingbzrdir = property(_get_matching_bzrdir, _ignore_setting_bzrdir)
+
+ def get_format_string(self):
+ """See RepositoryFormat.get_format_string()."""
+ return "Bazaar development format 0 (needs bzr.dev from before 1.3)\n"
+
+ def get_format_description(self):
+ """See RepositoryFormat.get_format_description()."""
+ return ("Development repository format, currently the same as "
+ "pack-0.92\n")
+
+ def check_conversion_target(self, target_format):
+ pass
+
+
+class RepositoryFormatPackDevelopment0Subtree(RepositoryFormatPack):
+ """A subtrees development repository.
+
+ This format should be retained until the second release after bzr 1.0.
+
+ No changes to the disk behaviour from pack-0.92-subtree.
+ """
+
+ repository_class = KnitPackRepository
+ _commit_builder_class = PackRootCommitBuilder
+ rich_root_data = True
+ supports_tree_reference = True
+ _serializer = xml7.serializer_v7
+
+ def _get_matching_bzrdir(self):
+ return bzrdir.format_registry.make_bzrdir(
+ 'development0-subtree')
+
+ 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)
+ if not getattr(target_format, 'supports_tree_reference', False):
+ raise errors.BadConversionTarget(
+ 'Does not support nested trees', target_format)
+
+ def get_format_string(self):
+ """See RepositoryFormat.get_format_string()."""
+ return ("Bazaar development format 0 with subtree support "
+ "(needs bzr.dev from before 1.3)\n")
+
+ def get_format_description(self):
+ """See RepositoryFormat.get_format_description()."""
+ return ("Development repository format, currently the same as "
+ "pack-0.92-subtree\n")
+
+
=== modified file 'bzrlib/repository.py'
--- a/bzrlib/repository.py 2008-02-04 22:01:14 +0000
+++ b/bzrlib/repository.py 2008-02-13 22:11:40 +0000
@@ -2298,7 +2298,7 @@
# 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.
+# NOTE: These are experimental in 0.92. Stable in 1.0 and above
format_registry.register_lazy(
'Bazaar pack repository format 1 (needs bzr 0.92)\n',
'bzrlib.repofmt.pack_repo',
@@ -2314,6 +2314,21 @@
'bzrlib.repofmt.pack_repo',
'RepositoryFormatKnitPack4',
)
+# Development formats.
+# 1.2->1.3
+# development 0 - stub to introduce development versioning scheme.
+format_registry.register_lazy(
+ "Bazaar development format 0 (needs bzr.dev from before 1.3)\n",
+ 'bzrlib.repofmt.pack_repo',
+ 'RepositoryFormatPackDevelopment0',
+ )
+format_registry.register_lazy(
+ ("Bazaar development format 0 with subtree support "
+ "(needs bzr.dev from before 1.3)\n"),
+ 'bzrlib.repofmt.pack_repo',
+ 'RepositoryFormatPackDevelopment0Subtree',
+ )
+# 1.3->1.4 go below here
class InterRepository(InterObject):
@@ -2826,13 +2841,24 @@
try:
from bzrlib.repofmt.knitrepo import (RepositoryFormatKnit1,
RepositoryFormatKnit3)
- from bzrlib.repofmt.pack_repo import (RepositoryFormatKnitPack1,
- RepositoryFormatKnitPack3)
- return (isinstance(source._format,
- (RepositoryFormatKnit1, RepositoryFormatKnitPack1)) and
- isinstance(target._format,
- (RepositoryFormatKnit3, RepositoryFormatKnitPack3))
- )
+ from bzrlib.repofmt.pack_repo import (
+ RepositoryFormatKnitPack1,
+ RepositoryFormatKnitPack3,
+ RepositoryFormatPackDevelopment0,
+ RepositoryFormatPackDevelopment0Subtree,
+ )
+ nosubtrees = (
+ RepositoryFormatKnit1,
+ RepositoryFormatKnitPack1,
+ RepositoryFormatPackDevelopment0,
+ )
+ subtrees = (
+ RepositoryFormatKnit3,
+ RepositoryFormatKnitPack3,
+ RepositoryFormatPackDevelopment0Subtree,
+ )
+ return (isinstance(source._format, nosubtrees) and
+ isinstance(target._format, subtrees))
except AttributeError:
return False
=== modified file 'bzrlib/tests/test_bzrdir.py'
--- a/bzrlib/tests/test_bzrdir.py 2007-12-24 15:42:28 +0000
+++ b/bzrlib/tests/test_bzrdir.py 2008-02-13 22:11:40 +0000
@@ -170,6 +170,16 @@
finally:
bzrdir.format_registry.set_default_repository(old_default)
+ def test_aliases(self):
+ a_registry = bzrdir.BzrDirFormatRegistry()
+ a_registry.register('weave', bzrdir.BzrDirFormat6,
+ 'Pre-0.8 format. Slower and does not support checkouts or shared'
+ ' repositories', deprecated=True)
+ a_registry.register('weavealias', bzrdir.BzrDirFormat6,
+ 'Pre-0.8 format. Slower and does not support checkouts or shared'
+ ' repositories', deprecated=True, alias=True)
+ self.assertEqual(frozenset(['weavealias']), a_registry.aliases())
+
class SampleBranch(bzrlib.branch.Branch):
"""A dummy branch for guess what, dummy use."""
=== modified file 'bzrlib/tests/test_info.py'
--- a/bzrlib/tests/test_info.py 2007-11-26 13:55:51 +0000
+++ b/bzrlib/tests/test_info.py 2008-01-06 20:04:22 +0000
@@ -126,16 +126,22 @@
def test_describe_tree_format(self):
for key in bzrdir.format_registry.keys():
- if key == 'default':
+ if key in bzrdir.format_registry.aliases():
continue
self.assertTreeDescription(key)
def test_describe_checkout_format(self):
for key in bzrdir.format_registry.keys():
- if key in ('default', 'weave', 'experimental'):
- continue
- if key.startswith('experimental-'):
- # these are typically hidden or aliases for other formats
+ if key in bzrdir.format_registry.aliases():
+ # Aliases will not describe correctly in the UI because the
+ # real format is found.
+ continue
+ # legacy: weave does not support checkouts
+ if key == 'weave':
+ continue
+ if bzrdir.format_registry.get_info(key).experimental:
+ # We don't require that experimental formats support checkouts
+ # or describe correctly in the UI.
continue
expected = None
if key in ('dirstate', 'dirstate-tags', 'dirstate-with-subtree',
@@ -149,7 +155,7 @@
def test_describe_branch_format(self):
for key in bzrdir.format_registry.keys():
- if key == 'default':
+ if key in bzrdir.format_registry.aliases():
continue
expected = None
if key in ('dirstate', 'knit'):
@@ -158,7 +164,7 @@
def test_describe_repo_format(self):
for key in bzrdir.format_registry.keys():
- if key == 'default':
+ if key in bzrdir.format_registry.aliases():
continue
expected = None
if key in ('dirstate', 'knit', 'dirstate-tags'):
=== modified file 'bzrlib/tests/test_repository.py'
--- a/bzrlib/tests/test_repository.py 2008-01-17 05:30:53 +0000
+++ b/bzrlib/tests/test_repository.py 2008-02-13 22:11:40 +0000
@@ -1184,6 +1184,31 @@
t.get('format').read())
+class TestDevelopment0(TestKnitPackNoSubtrees):
+
+ def get_format(self):
+ return bzrdir.format_registry.make_bzrdir(
+ 'development')
+
+ def check_format(self, t):
+ self.assertEqualDiff(
+ "Bazaar development format 0 (needs bzr.dev from before 1.3)\n",
+ t.get('format').read())
+
+
+class TestDevelopment0Subtree(TestKnitPackNoSubtrees):
+
+ def get_format(self):
+ return bzrdir.format_registry.make_bzrdir(
+ 'development-subtree')
+
+ def check_format(self, t):
+ self.assertEqualDiff(
+ "Bazaar development format 0 with subtree support "
+ "(needs bzr.dev from before 1.3)\n",
+ t.get('format').read())
+
+
class TestRepositoryPackCollection(TestCaseWithTransport):
def get_format(self):
More information about the bazaar-commits
mailing list