Merge lp:~lifeless/bzr/bug-398668 into lp:~bzr/bzr/trunk-old

Proposed by Robert Collins
Status: Merged
Merged at revision: not available
Proposed branch: lp:~lifeless/bzr/bug-398668
Merge into: lp:~bzr/bzr/trunk-old
Diff against target: 504 lines
To merge this branch: bzr merge lp:~lifeless/bzr/bug-398668
Reviewer Review Type Date Requested Status
John A Meinel Approve
Review via email: mp+10288@code.launchpad.net

This proposal supersedes a proposal from 2009-08-17.

To post a comment you must log in.
Revision history for this message
Robert Collins (lifeless) wrote : Posted in a previous version of this proposal

This makes 2a the default format.

The web diff will be overly large - there are many approved components
of this branch currently landing on PQM.

So to review, you'll probably want to pull my bzr.dev once the current
branch has landed and merge. I'll do that myself and update the branch,
but even the lp will take hours to get up to speed.

Revision history for this message
Robert Collins (lifeless) wrote :
Download full text (25.1 KiB)

The diff is likely still a problem - here is a manual diff.

=== modified file 'NEWS'
--- NEWS 2009-08-15 09:15:03 +0000
+++ NEWS 2009-08-17 23:19:17 +0000
@@ -9,6 +9,21 @@
 In Development
 ##############

+Compatibility Breaks
+********************
+
+* The default format for bzr is now ``2a``. This format brings many
+ significant performance and size improvements. bzr can pull from
+ any existing repository into a ``2a`` one, but can only transfer
+ into ``rich-root`` repositories from ``2a``. The Upgrade guide
+ has more information about this change. (Robert Collins)
+
+New Features
+************
+
+Bug Fixes
+*********
+
 Improvements
 ************

@@ -16,6 +31,18 @@
   --version`` and ``bzr selftest``.
   (Martin Pool, #409137)

+Documentation
+*************
+
+API Changes
+***********
+
+Internals
+*********
+
+Testing
+*******
+
 bzr 1.18
 ########

@@ -58,6 +85,11 @@
 * StreamSource generates rich roots from non-rich root sources correctly
   now. (Andrew Bennetts, #368921)

+* When deciding whether a repository was compatible for upgrading or
+ fetching, we previously incorrectly checked the default repository
+ format for the bzrdir format, rather than the format that was actually
+ present on disk. (Martin Pool, #408824)
+
 Improvements
 ************

@@ -105,8 +137,8 @@
   can run the https tests. (Denys Duchier, #392401)

-bzr 1.18
-########
+bzr 1.18rc1
+###########

 :Codename: little traveller
 :1.18rc1: 2009-08-10

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

=== modified file 'bzrlib/bzrdir.py'
--- bzrlib/bzrdir.py 2009-08-17 06:17:21 +0000
+++ bzrlib/bzrdir.py 2009-08-17 07:47:50 +0000
@@ -130,8 +130,7 @@

     def check_conversion_target(self, target_format):
         target_repo_format = target_format.repository_format
- source_repo_format = self._format.repository_format
- source_repo_format.check_conversion_target(target_repo_format)
+ self.open_repository()._format.check_conversion_target(target_repo_format)

     @staticmethod
     def _check_supported(format, allow_unsupported,
@@ -3865,11 +3864,11 @@
 # The following format should be an alias for the rich root equivalent
 # of the default format
 format_registry.register_metadir('default-rich-root',
- 'bzrlib.repofmt.pack_repo.RepositoryFormatKnitPack4',
- help='Default format, rich root variant. (needed for bzr-svn and bzr-git).',
- branch_format='bzrlib.branch.BzrBranchFormat6',
- tree_format='bzrlib.workingtree.WorkingTreeFormat4',
+ 'bzrlib.repofmt.groupcompress_repo.RepositoryFormat2a',
+ branch_format='bzrlib.branch.BzrBranchFormat7',
+ tree_format='bzrlib.workingtree.WorkingTreeFormat6',
     alias=True,
- )
+ help='Same as 2a.')
+
 # The current format that is made on 'bzr init'.
-format_re...

Revision history for this message
Robert Collins (lifeless) wrote :
Revision history for this message
John A Meinel (jameinel) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

...

> # The following format should be an alias for the rich root equivalent
> # of the default format
> format_registry.register_metadir('default-rich-root',
> - 'bzrlib.repofmt.pack_repo.RepositoryFormatKnitPack4',
> - help='Default format, rich root variant. (needed for bzr-svn and bzr-git).',
> - branch_format='bzrlib.branch.BzrBranchFormat6',
> - tree_format='bzrlib.workingtree.WorkingTreeFormat4',
> + 'bzrlib.repofmt.groupcompress_repo.RepositoryFormat2a',
> + branch_format='bzrlib.branch.BzrBranchFormat7',
> + tree_format='bzrlib.workingtree.WorkingTreeFormat6',
> alias=True,
> - )
> + help='Same as 2a.')
> +
> # The current format that is made on 'bzr init'.
> -format_registry.set_default('pack-0.92')
> +format_registry.set_default('2a')

^- I'm 75% sure that we want the default WT format to be
"WorkingTreeFormat5" and not 6. 5 includes support for filters, 6
brings in support for 'views'. And View support was considered
incomplete, and thus why it was split out into a different format.

...

v- Obviously changing the above to '5' will bump all of these as well.

> Format:
> control: Meta directory format 1
> - working tree: Working tree format 4
> + working tree: Working tree format 6
> branch: Branch format 4
> repository: Weave repository format 6
>
> @@ -453,7 +449,7 @@
>
...

> -__default_format = WorkingTreeFormat4()
> +__default_format = WorkingTreeFormat6()
> WorkingTreeFormat.register_format(__default_format)
> -WorkingTreeFormat.register_format(WorkingTreeFormat6())
> WorkingTreeFormat.register_format(WorkingTreeFormat5())
> +WorkingTreeFormat.register_format(WorkingTreeFormat4())
> WorkingTreeFormat.register_format(WorkingTreeFormat3())
> WorkingTreeFormat.set_default_format(__default_format)
> # formats which have no format string are not discoverable

^- This would also be effected.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkqKrzsACgkQJdeBCYSNAAONjACgnQBU95OlegGgtPzeaPVesvxO
/p0AnR+zohxUXfeHnv3QfQ3Q4RT+tcAc
=3UXs
-----END PGP SIGNATURE-----

Revision history for this message
John A Meinel (jameinel) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robert Collins wrote:
> Robert Collins has proposed merging lp:~lifeless/bzr/bug-398668 into lp:bzr.
>
> The diff is likely still a problem - here is a manual diff.

Sorry, I meant to include:
  review: approve

Provided there is agreement about WT5 vs WT6.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkqKr1MACgkQJdeBCYSNAAMrAwCfSQLQ5ykqfetCyw2Fdp2YqGDT
NP4AnRP63XK5SOcngerDN+SdwjWUFc+l
=cqKQ
-----END PGP SIGNATURE-----

review: Approve
Revision history for this message
Robert Collins (lifeless) wrote :

On Tue, 2009-08-18 at 13:42 +0000, John A Meinel wrote:
> Review: Approve
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Robert Collins wrote:
> > Robert Collins has proposed merging lp:~lifeless/bzr/bug-398668 into lp:bzr.
> >
> > The diff is likely still a problem - here is a manual diff.
>
> Sorry, I meant to include:
> review: approve
>
> Provided there is agreement about WT5 vs WT6.

2a is format 6, and thats a supported format. Assuming that you're
right, we need to actually downgrade 2a in 1.16/1.17/1.18 as well -
definitely out of scope for this patch - and while changing the default
will increase the number of 2a users out there, we have from now until
the release to decide on this.

There is one outstanding log test I need to change as well, but I'll
land that change asynchronously - I don't want to let this [somewhat
fragile branch] bitrot at all.

Thanks for the review.

-Rob

Revision history for this message
Ian Clatworthy (ian-clatworthy) wrote :

Robert Collins wrote:
> On Tue, 2009-08-18 at 13:42 +0000, John A Meinel wrote:
>> Review: Approve
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Robert Collins wrote:
>>> Robert Collins has proposed merging lp:~lifeless/bzr/bug-398668 into lp:bzr.
>>>
>>> The diff is likely still a problem - here is a manual diff.
>> Sorry, I meant to include:
>> review: approve
>>
>> Provided there is agreement about WT5 vs WT6.
>
> 2a is format 6, and thats a supported format. Assuming that you're
> right, we need to actually downgrade 2a in 1.16/1.17/1.18 as well -

I'd prefer to keep the format exactly as it is now and stay with WT6.
I'm happy to make filtered views an experimental-only feature for 2.0,
say so loudly in the doc and hide the view command if appropriate. But I
don't want to remove the ability to store the filtered view metadata in
the default format.

Ian C.

Revision history for this message
Robert Collins (lifeless) wrote :

On Wed, 2009-08-19 at 01:03 +0000, Ian Clatworthy wrote:
>
> > 2a is format 6, and thats a supported format. Assuming that you're
> > right, we need to actually downgrade 2a in 1.16/1.17/1.18 as well -
>
> I'd prefer to keep the format exactly as it is now and stay with WT6.
> I'm happy to make filtered views an experimental-only feature for 2.0,
> say so loudly in the doc and hide the view command if appropriate. But
> I
> don't want to remove the ability to store the filtered view metadata
> in
> the default format.

I don't have any particular opinion.

The default is 2a with wt6 trees, at this point.

Cheers,
Rob

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'NEWS'
--- NEWS 2009-08-18 07:20:02 +0000
+++ NEWS 2009-08-18 20:35:49 +0000
@@ -28,6 +28,43 @@
28Compatibility Breaks28Compatibility Breaks
29********************29********************
3030
31* The default format for bzr is now ``2a``. This format brings many
32 significant performance and size improvements. bzr can pull from
33 any existing repository into a ``2a`` one, but can only transfer
34 into ``rich-root`` repositories from ``2a``. The Upgrade guide
35 has more information about this change. (Robert Collins)
36
37New Features
38************
39
40Bug Fixes
41*********
42
43Improvements
44************
45
46* A better description of the platform is shown in crash tracebacks, ``bzr
47 --version`` and ``bzr selftest``.
48 (Martin Pool, #409137)
49
50Documentation
51*************
52
53API Changes
54***********
55
56Internals
57*********
58
59Testing
60*******
61
62bzr 1.18
63########
64
65Compatibility Breaks
66********************
67
31* Committing directly to a stacked branch from a lightweight checkout will68* Committing directly to a stacked branch from a lightweight checkout will
32 no longer work. In previous versions this would appear to work but would69 no longer work. In previous versions this would appear to work but would
33 generate repositories with insufficient data to create deltas, leading70 generate repositories with insufficient data to create deltas, leading
@@ -116,8 +153,8 @@
116 can run the https tests. (Denys Duchier, #392401)153 can run the https tests. (Denys Duchier, #392401)
117 154
118155
119bzr 1.18156bzr 1.18rc1
120########157###########
121158
122:Codename: little traveller159:Codename: little traveller
123:1.18rc1: 2009-08-10160:1.18rc1: 2009-08-10
124161
=== modified file 'bzrlib/branch.py'
--- bzrlib/branch.py 2009-08-17 06:17:21 +0000
+++ bzrlib/branch.py 2009-08-18 20:35:49 +0000
@@ -2067,7 +2067,7 @@
2067BranchFormat.register_format(__format6)2067BranchFormat.register_format(__format6)
2068BranchFormat.register_format(__format7)2068BranchFormat.register_format(__format7)
2069BranchFormat.register_format(__format8)2069BranchFormat.register_format(__format8)
2070BranchFormat.set_default_format(__format6)2070BranchFormat.set_default_format(__format7)
2071_legacy_formats = [BzrBranchFormat4(),2071_legacy_formats = [BzrBranchFormat4(),
2072 ]2072 ]
2073network_format_registry.register(2073network_format_registry.register(
20742074
=== modified file 'bzrlib/bzrdir.py'
--- bzrlib/bzrdir.py 2009-08-18 01:38:56 +0000
+++ bzrlib/bzrdir.py 2009-08-18 20:35:50 +0000
@@ -3864,11 +3864,11 @@
3864# The following format should be an alias for the rich root equivalent 3864# The following format should be an alias for the rich root equivalent
3865# of the default format3865# of the default format
3866format_registry.register_metadir('default-rich-root',3866format_registry.register_metadir('default-rich-root',
3867 'bzrlib.repofmt.pack_repo.RepositoryFormatKnitPack4',3867 'bzrlib.repofmt.groupcompress_repo.RepositoryFormat2a',
3868 help='Default format, rich root variant. (needed for bzr-svn and bzr-git).',3868 branch_format='bzrlib.branch.BzrBranchFormat7',
3869 branch_format='bzrlib.branch.BzrBranchFormat6',3869 tree_format='bzrlib.workingtree.WorkingTreeFormat6',
3870 tree_format='bzrlib.workingtree.WorkingTreeFormat4',
3871 alias=True,3870 alias=True,
3872 )3871 help='Same as 2a.')
3872
3873# The current format that is made on 'bzr init'.3873# The current format that is made on 'bzr init'.
3874format_registry.set_default('pack-0.92')3874format_registry.set_default('2a')
38753875
=== modified file 'bzrlib/tests/blackbox/test_info.py'
--- bzrlib/tests/blackbox/test_info.py 2009-08-14 13:55:30 +0000
+++ bzrlib/tests/blackbox/test_info.py 2009-08-18 20:35:50 +0000
@@ -37,11 +37,7 @@
3737
38 def setUp(self):38 def setUp(self):
39 ExternalBase.setUp(self)39 ExternalBase.setUp(self)
40 self._repo_strings = (40 self._repo_strings = "2a or development-subtree"
41 "1.6 or 1.6.1-rich-root "
42 "or 1.9 or 1.9-rich-root "
43 "or dirstate or dirstate-tags or "
44 "pack-0.92 or rich-root or rich-root-pack")
4541
46 def test_info_non_existing(self):42 def test_info_non_existing(self):
47 if sys.platform == "win32":43 if sys.platform == "win32":
@@ -291,7 +287,7 @@
291287
292Format:288Format:
293 control: Meta directory format 1289 control: Meta directory format 1
294 working tree: Working tree format 4290 working tree: Working tree format 6
295 branch: Branch format 4291 branch: Branch format 4
296 repository: Weave repository format 6292 repository: Weave repository format 6
297293
@@ -453,7 +449,7 @@
453449
454Format:450Format:
455 control: Meta directory format 1451 control: Meta directory format 1
456 working tree: Working tree format 4452 working tree: Working tree format 6
457 branch: Branch format 4453 branch: Branch format 4
458 repository: Weave repository format 6454 repository: Weave repository format 6
459455
@@ -586,7 +582,7 @@
586582
587Format:583Format:
588 control: Meta directory format 1584 control: Meta directory format 1
589 working tree: Working tree format 4585 working tree: Working tree format 6
590 branch: %s586 branch: %s
591 repository: %s587 repository: %s
592588
@@ -617,14 +613,14 @@
617 # Out of date checkout613 # Out of date checkout
618 out, err = self.run_bzr('info -v tree/checkout')614 out, err = self.run_bzr('info -v tree/checkout')
619 self.assertEqualDiff(615 self.assertEqualDiff(
620"""Checkout (format: dirstate)616"""Checkout (format: unnamed)
621Location:617Location:
622 checkout root: tree/checkout618 checkout root: tree/checkout
623 checkout of branch: repo/branch619 checkout of branch: repo/branch
624620
625Format:621Format:
626 control: Meta directory format 1622 control: Meta directory format 1
627 working tree: Working tree format 4623 working tree: Working tree format 6
628 branch: %s624 branch: %s
629 repository: %s625 repository: %s
630626
@@ -656,14 +652,14 @@
656 tree3.add('b')652 tree3.add('b')
657 out, err = self.run_bzr('info tree/checkout --verbose')653 out, err = self.run_bzr('info tree/checkout --verbose')
658 self.assertEqualDiff(654 self.assertEqualDiff(
659"""Checkout (format: dirstate)655"""Checkout (format: unnamed)
660Location:656Location:
661 checkout root: tree/checkout657 checkout root: tree/checkout
662 checkout of branch: repo/branch658 checkout of branch: repo/branch
663659
664Format:660Format:
665 control: Meta directory format 1661 control: Meta directory format 1
666 working tree: Working tree format 4662 working tree: Working tree format 6
667 branch: %s663 branch: %s
668 repository: %s664 repository: %s
669665
@@ -705,7 +701,7 @@
705701
706Format:702Format:
707 control: Meta directory format 1703 control: Meta directory format 1
708 working tree: Working tree format 4704 working tree: Working tree format 6
709 branch: %s705 branch: %s
710 repository: %s706 repository: %s
711707
@@ -1131,7 +1127,7 @@
1131 (False, False): 'Checkout',1127 (False, False): 'Checkout',
1132 }[(shared_repo is not None, light_checkout)]1128 }[(shared_repo is not None, light_checkout)]
1133 format = {True: self._repo_strings,1129 format = {True: self._repo_strings,
1134 False: 'dirstate'}[light_checkout]1130 False: 'unnamed'}[light_checkout]
1135 if repo_locked:1131 if repo_locked:
1136 repo_locked = lco_tree.branch.repository.get_physical_lock_status()1132 repo_locked = lco_tree.branch.repository.get_physical_lock_status()
1137 if repo_locked or branch_locked or tree_locked:1133 if repo_locked or branch_locked or tree_locked:
11381134
=== modified file 'bzrlib/tests/blackbox/test_init.py'
--- bzrlib/tests/blackbox/test_init.py 2009-08-12 21:58:32 +0000
+++ bzrlib/tests/blackbox/test_init.py 2009-08-18 20:35:50 +0000
@@ -35,7 +35,7 @@
3535
36 def setUp(self):36 def setUp(self):
37 ExternalBase.setUp(self)37 ExternalBase.setUp(self)
38 self._default_label = 'pack-0.92'38 self._default_label = '2a'
3939
40 def test_init_with_format(self):40 def test_init_with_format(self):
41 # Verify bzr init --format constructs something plausible41 # Verify bzr init --format constructs something plausible
4242
=== modified file 'bzrlib/tests/blackbox/test_shared_repository.py'
--- bzrlib/tests/blackbox/test_shared_repository.py 2009-03-23 14:59:43 +0000
+++ bzrlib/tests/blackbox/test_shared_repository.py 2009-08-18 20:35:50 +0000
@@ -27,7 +27,7 @@
27 def test_make_repository(self):27 def test_make_repository(self):
28 out, err = self.run_bzr("init-repository a")28 out, err = self.run_bzr("init-repository a")
29 self.assertEqual(out,29 self.assertEqual(out,
30"""Shared repository with trees (format: pack-0.92)30"""Shared repository with trees (format: 2a)
31Location:31Location:
32 shared repository: a32 shared repository: a
33""")33""")
3434
=== modified file 'bzrlib/tests/per_repository/test_add_fallback_repository.py'
--- bzrlib/tests/per_repository/test_add_fallback_repository.py 2009-03-23 14:59:43 +0000
+++ bzrlib/tests/per_repository/test_add_fallback_repository.py 2009-08-18 20:35:50 +0000
@@ -29,14 +29,7 @@
29class TestAddFallbackRepository(TestCaseWithRepository):29class TestAddFallbackRepository(TestCaseWithRepository):
3030
31 def test_add_fallback_repository(self):31 def test_add_fallback_repository(self):
32 if isinstance(self.repository_format, remote.RemoteRepositoryFormat):32 repo = self.make_repository('repo')
33 # RemoteRepository by default builds a default format real
34 # repository, but the default format is unstackble. So explicitly
35 # make a stackable real repository and use that.
36 repo = self.make_repository('repo', format='1.9')
37 repo = bzrdir.BzrDir.open(self.get_url('repo')).open_repository()
38 else:
39 repo = self.make_repository('repo')
40 tree = self.make_branch_and_tree('branch')33 tree = self.make_branch_and_tree('branch')
41 if not repo._format.supports_external_lookups:34 if not repo._format.supports_external_lookups:
42 self.assertRaises(errors.UnstackableRepositoryFormat,35 self.assertRaises(errors.UnstackableRepositoryFormat,
4336
=== modified file 'bzrlib/tests/per_repository/test_repository.py'
--- bzrlib/tests/per_repository/test_repository.py 2009-06-26 09:24:34 +0000
+++ bzrlib/tests/per_repository/test_repository.py 2009-08-18 20:35:50 +0000
@@ -929,8 +929,14 @@
929 transport.mkdir('.')929 transport.mkdir('.')
930 target_bzrdir = bzrdir_format.initialize_on_transport(transport)930 target_bzrdir = bzrdir_format.initialize_on_transport(transport)
931 branch = BzrBranchFormat6().initialize(target_bzrdir)931 branch = BzrBranchFormat6().initialize(target_bzrdir)
932 #branch = self.make_branch('repo/branch', format='pack-0.92')932 if not repo.supports_rich_root():
933 self.make_branch('stack-on-me')933 stack_on_format = "pack-0.92"
934 else:
935 if repo._format.supports_chks:
936 stack_on_format = "2a"
937 else:
938 stack_on_format = "1.9-rich-root"
939 self.make_branch('stack-on-me', format=stack_on_format)
934 self.make_bzrdir('.').get_config().set_default_stack_on('stack-on-me')940 self.make_bzrdir('.').get_config().set_default_stack_on('stack-on-me')
935 target = branch.bzrdir.clone(self.get_url('target'))941 target = branch.bzrdir.clone(self.get_url('target'))
936 # The target branch supports stacking if the source repository does.942 # The target branch supports stacking if the source repository does.
937943
=== modified file 'bzrlib/tests/test_branch.py'
--- bzrlib/tests/test_branch.py 2009-07-10 05:49:34 +0000
+++ bzrlib/tests/test_branch.py 2009-08-18 20:35:50 +0000
@@ -40,6 +40,7 @@
40 BzrBranch5,40 BzrBranch5,
41 BzrBranchFormat5,41 BzrBranchFormat5,
42 BzrBranchFormat6,42 BzrBranchFormat6,
43 BzrBranchFormat7,
43 PullResult,44 PullResult,
44 _run_with_write_locked_target,45 _run_with_write_locked_target,
45 )46 )
@@ -60,7 +61,7 @@
60 def test_default_format(self):61 def test_default_format(self):
61 # update this if you change the default branch format62 # update this if you change the default branch format
62 self.assertIsInstance(BranchFormat.get_default_format(),63 self.assertIsInstance(BranchFormat.get_default_format(),
63 BzrBranchFormat6)64 BzrBranchFormat7)
6465
65 def test_default_format_is_same_as_bzrdir_default(self):66 def test_default_format_is_same_as_bzrdir_default(self):
66 # XXX: it might be nice if there was only one place the default was67 # XXX: it might be nice if there was only one place the default was
6768
=== modified file 'bzrlib/tests/test_dirstate.py'
--- bzrlib/tests/test_dirstate.py 2009-07-15 01:13:20 +0000
+++ bzrlib/tests/test_dirstate.py 2009-08-18 20:35:50 +0000
@@ -419,7 +419,7 @@
419 (('', '', tree.get_root_id()), # common details419 (('', '', tree.get_root_id()), # common details
420 [('d', '', 0, False, dirstate.DirState.NULLSTAT), # current tree420 [('d', '', 0, False, dirstate.DirState.NULLSTAT), # current tree
421 ('d', '', 0, False, rev_id), # first parent details421 ('d', '', 0, False, rev_id), # first parent details
422 ('d', '', 0, False, rev_id2), # second parent details422 ('d', '', 0, False, rev_id), # second parent details
423 ])])423 ])])
424 state = dirstate.DirState.from_tree(tree, 'dirstate')424 state = dirstate.DirState.from_tree(tree, 'dirstate')
425 self.check_state_with_reopen(expected_result, state)425 self.check_state_with_reopen(expected_result, state)
@@ -500,7 +500,7 @@
500 (('', '', tree.get_root_id()), # common details500 (('', '', tree.get_root_id()), # common details
501 [('d', '', 0, False, dirstate.DirState.NULLSTAT), # current tree501 [('d', '', 0, False, dirstate.DirState.NULLSTAT), # current tree
502 ('d', '', 0, False, rev_id), # first parent details502 ('d', '', 0, False, rev_id), # first parent details
503 ('d', '', 0, False, rev_id2), # second parent details503 ('d', '', 0, False, rev_id), # second parent details
504 ]),504 ]),
505 (('', 'a file', 'a-file-id'), # common505 (('', 'a file', 'a-file-id'), # common
506 [('f', '', 0, False, dirstate.DirState.NULLSTAT), # current506 [('f', '', 0, False, dirstate.DirState.NULLSTAT), # current
@@ -1000,7 +1000,7 @@
1000 [(('', '', root_id), [1000 [(('', '', root_id), [
1001 ('d', '', 0, False, dirstate.DirState.NULLSTAT),1001 ('d', '', 0, False, dirstate.DirState.NULLSTAT),
1002 ('d', '', 0, False, revid1),1002 ('d', '', 0, False, revid1),
1003 ('d', '', 0, False, revid2)1003 ('d', '', 0, False, revid1)
1004 ])],1004 ])],
1005 list(state._iter_entries()))1005 list(state._iter_entries()))
1006 finally:1006 finally:
@@ -1034,7 +1034,7 @@
1034 (('', '', root_id), [1034 (('', '', root_id), [
1035 ('d', '', 0, False, dirstate.DirState.NULLSTAT),1035 ('d', '', 0, False, dirstate.DirState.NULLSTAT),
1036 ('d', '', 0, False, revid1.encode('utf8')),1036 ('d', '', 0, False, revid1.encode('utf8')),
1037 ('d', '', 0, False, revid2.encode('utf8'))1037 ('d', '', 0, False, revid1.encode('utf8'))
1038 ]),1038 ]),
1039 (('', 'a file', 'file-id'), [1039 (('', 'a file', 'file-id'), [
1040 ('a', '', 0, False, ''),1040 ('a', '', 0, False, ''),
10411041
=== modified file 'bzrlib/tests/test_foreign.py'
--- bzrlib/tests/test_foreign.py 2009-08-14 04:30:32 +0000
+++ bzrlib/tests/test_foreign.py 2009-08-18 20:35:50 +0000
@@ -320,7 +320,7 @@
320 foreign.update_workingtree_fileids(wt, target_basis)320 foreign.update_workingtree_fileids(wt, target_basis)
321 wt.lock_read()321 wt.lock_read()
322 try:322 try:
323 self.assertEquals([root_id, "bla-b"], list(wt.inventory))323 self.assertEquals(set([root_id, "bla-b"]), set(wt.inventory))
324 finally:324 finally:
325 wt.unlock()325 wt.unlock()
326326
327327
=== modified file 'bzrlib/tests/test_log.py'
--- bzrlib/tests/test_log.py 2009-08-17 19:31:29 +0000
+++ bzrlib/tests/test_log.py 2009-08-18 20:35:50 +0000
@@ -142,6 +142,9 @@
142 lf = LogCatcher()142 lf = LogCatcher()
143 log.show_log(wt.branch, lf, verbose=True)143 log.show_log(wt.branch, lf, verbose=True)
144 committed_msg = lf.revisions[0].rev.message144 committed_msg = lf.revisions[0].rev.message
145 if msg == committed_msg:
146 raise tests.KnownFailure(
147 "Commit message was preserved, but it wasn't expected to be.")
145 self.assertNotEqual(msg, committed_msg)148 self.assertNotEqual(msg, committed_msg)
146 self.assertTrue(len(committed_msg) > len(msg))149 self.assertTrue(len(committed_msg) > len(msg))
147150
148151
=== modified file 'bzrlib/tests/test_remote.py'
--- bzrlib/tests/test_remote.py 2009-08-14 00:55:42 +0000
+++ bzrlib/tests/test_remote.py 2009-08-18 20:35:50 +0000
@@ -661,8 +661,9 @@
661 network_name = reference_format.network_name()661 network_name = reference_format.network_name()
662 client.add_expected_call(662 client.add_expected_call(
663 'BzrDir.create_repository', ('quack/',663 'BzrDir.create_repository', ('quack/',
664 'Bazaar pack repository format 1 (needs bzr 0.92)\n', 'False'),664 'Bazaar repository format 2a (needs bzr 1.16 or later)\n',
665 'success', ('ok', 'no', 'no', 'no', network_name))665 'False'),
666 'success', ('ok', 'yes', 'yes', 'yes', network_name))
666 a_bzrdir = RemoteBzrDir(transport, remote.RemoteBzrDirFormat(),667 a_bzrdir = RemoteBzrDir(transport, remote.RemoteBzrDirFormat(),
667 _client=client)668 _client=client)
668 repo = a_bzrdir.create_repository()669 repo = a_bzrdir.create_repository()
@@ -670,9 +671,9 @@
670 self.assertIsInstance(repo, remote.RemoteRepository)671 self.assertIsInstance(repo, remote.RemoteRepository)
671 # its format should have the settings from the response672 # its format should have the settings from the response
672 format = repo._format673 format = repo._format
673 self.assertFalse(format.rich_root_data)674 self.assertTrue(format.rich_root_data)
674 self.assertFalse(format.supports_tree_reference)675 self.assertTrue(format.supports_tree_reference)
675 self.assertFalse(format.supports_external_lookups)676 self.assertTrue(format.supports_external_lookups)
676 self.assertEqual(network_name, format.network_name())677 self.assertEqual(network_name, format.network_name())
677678
678679
@@ -2354,6 +2355,7 @@
2354 """2355 """
2355 # Define a stream using generators so that it isn't rewindable.2356 # Define a stream using generators so that it isn't rewindable.
2356 inv = inventory.Inventory(revision_id='rev1')2357 inv = inventory.Inventory(revision_id='rev1')
2358 inv.root.revision = 'rev1'
2357 def stream_with_inv_delta():2359 def stream_with_inv_delta():
2358 yield ('inventories', inventories_substream())2360 yield ('inventories', inventories_substream())
2359 yield ('inventory-deltas', inventory_delta_substream())2361 yield ('inventory-deltas', inventory_delta_substream())
23602362
=== modified file 'bzrlib/tests/test_selftest.py'
--- bzrlib/tests/test_selftest.py 2009-08-15 09:15:03 +0000
+++ bzrlib/tests/test_selftest.py 2009-08-18 20:35:50 +0000
@@ -40,6 +40,7 @@
40 workingtree,40 workingtree,
41 )41 )
42from bzrlib.repofmt import (42from bzrlib.repofmt import (
43 groupcompress_repo,
43 pack_repo,44 pack_repo,
44 weaverepo,45 weaverepo,
45 )46 )
@@ -215,24 +216,24 @@
215 from bzrlib.tests.per_repository import formats_to_scenarios216 from bzrlib.tests.per_repository import formats_to_scenarios
216 formats = [("(c)", remote.RemoteRepositoryFormat()),217 formats = [("(c)", remote.RemoteRepositoryFormat()),
217 ("(d)", repository.format_registry.get(218 ("(d)", repository.format_registry.get(
218 'Bazaar pack repository format 1 (needs bzr 0.92)\n'))]219 'Bazaar repository format 2a (needs bzr 1.16 or later)\n'))]
219 no_vfs_scenarios = formats_to_scenarios(formats, "server", "readonly",220 no_vfs_scenarios = formats_to_scenarios(formats, "server", "readonly",
220 None)221 None)
221 vfs_scenarios = formats_to_scenarios(formats, "server", "readonly",222 vfs_scenarios = formats_to_scenarios(formats, "server", "readonly",
222 vfs_transport_factory="vfs")223 vfs_transport_factory="vfs")
223 # no_vfs generate scenarios without vfs_transport_factory224 # no_vfs generate scenarios without vfs_transport_factory
224 self.assertEqual([225 expected = [
225 ('RemoteRepositoryFormat(c)',226 ('RemoteRepositoryFormat(c)',
226 {'bzrdir_format': remote.RemoteBzrDirFormat(),227 {'bzrdir_format': remote.RemoteBzrDirFormat(),
227 'repository_format': remote.RemoteRepositoryFormat(),228 'repository_format': remote.RemoteRepositoryFormat(),
228 'transport_readonly_server': 'readonly',229 'transport_readonly_server': 'readonly',
229 'transport_server': 'server'}),230 'transport_server': 'server'}),
230 ('RepositoryFormatKnitPack1(d)',231 ('RepositoryFormat2a(d)',
231 {'bzrdir_format': bzrdir.BzrDirMetaFormat1(),232 {'bzrdir_format': bzrdir.BzrDirMetaFormat1(),
232 'repository_format': pack_repo.RepositoryFormatKnitPack1(),233 'repository_format': groupcompress_repo.RepositoryFormat2a(),
233 'transport_readonly_server': 'readonly',234 'transport_readonly_server': 'readonly',
234 'transport_server': 'server'})],235 'transport_server': 'server'})]
235 no_vfs_scenarios)236 self.assertEqual(expected, no_vfs_scenarios)
236 self.assertEqual([237 self.assertEqual([
237 ('RemoteRepositoryFormat(c)',238 ('RemoteRepositoryFormat(c)',
238 {'bzrdir_format': remote.RemoteBzrDirFormat(),239 {'bzrdir_format': remote.RemoteBzrDirFormat(),
@@ -240,9 +241,9 @@
240 'transport_readonly_server': 'readonly',241 'transport_readonly_server': 'readonly',
241 'transport_server': 'server',242 'transport_server': 'server',
242 'vfs_transport_factory': 'vfs'}),243 'vfs_transport_factory': 'vfs'}),
243 ('RepositoryFormatKnitPack1(d)',244 ('RepositoryFormat2a(d)',
244 {'bzrdir_format': bzrdir.BzrDirMetaFormat1(),245 {'bzrdir_format': bzrdir.BzrDirMetaFormat1(),
245 'repository_format': pack_repo.RepositoryFormatKnitPack1(),246 'repository_format': groupcompress_repo.RepositoryFormat2a(),
246 'transport_readonly_server': 'readonly',247 'transport_readonly_server': 'readonly',
247 'transport_server': 'server',248 'transport_server': 'server',
248 'vfs_transport_factory': 'vfs'})],249 'vfs_transport_factory': 'vfs'})],
249250
=== modified file 'bzrlib/tests/test_smart.py'
--- bzrlib/tests/test_smart.py 2009-08-17 20:53:59 +0000
+++ bzrlib/tests/test_smart.py 2009-08-18 20:35:50 +0000
@@ -456,7 +456,7 @@
456 def test_stacked_branch(self):456 def test_stacked_branch(self):
457 """Opening a stacked branch does not open the stacked-on branch."""457 """Opening a stacked branch does not open the stacked-on branch."""
458 trunk = self.make_branch('trunk')458 trunk = self.make_branch('trunk')
459 feature = self.make_branch('feature', format='1.9')459 feature = self.make_branch('feature')
460 feature.set_stacked_on_url(trunk.base)460 feature.set_stacked_on_url(trunk.base)
461 opened_branches = []461 opened_branches = []
462 Branch.hooks.install_named_hook('open', opened_branches.append, None)462 Branch.hooks.install_named_hook('open', opened_branches.append, None)
463463
=== modified file 'bzrlib/tests/test_version_info.py'
--- bzrlib/tests/test_version_info.py 2009-04-06 02:54:14 +0000
+++ bzrlib/tests/test_version_info.py 2009-08-18 20:35:50 +0000
@@ -148,12 +148,11 @@
148 stanza = regen(check_for_clean=True, include_file_revisions=True)148 stanza = regen(check_for_clean=True, include_file_revisions=True)
149 self.assertEqual(['False'], stanza.get_all('clean'))149 self.assertEqual(['False'], stanza.get_all('clean'))
150150
151 # XXX: This assumes it's being run against a repository that updates151 # This assumes it's being run against a tree that does not update the
152 # the root revision on every commit. Newer ones that use152 # root revision on every commit.
153 # RootCommitBuilder won't update it on each commit.
154 file_rev_stanza = get_one_stanza(stanza, 'file-revisions')153 file_rev_stanza = get_one_stanza(stanza, 'file-revisions')
155 self.assertEqual(['', 'a', 'b', 'c'], file_rev_stanza.get_all('path'))154 self.assertEqual(['', 'a', 'b', 'c'], file_rev_stanza.get_all('path'))
156 self.assertEqual(['r3', 'r3', 'r2', 'unversioned'],155 self.assertEqual(['r1', 'r3', 'r2', 'unversioned'],
157 file_rev_stanza.get_all('revision'))156 file_rev_stanza.get_all('revision'))
158 os.remove('branch/c')157 os.remove('branch/c')
159158
@@ -171,7 +170,7 @@
171 file_rev_stanza = get_one_stanza(stanza, 'file-revisions')170 file_rev_stanza = get_one_stanza(stanza, 'file-revisions')
172 self.assertEqual(['', 'a', 'b', 'c', 'd'],171 self.assertEqual(['', 'a', 'b', 'c', 'd'],
173 file_rev_stanza.get_all('path'))172 file_rev_stanza.get_all('path'))
174 self.assertEqual(['r3', 'modified', 'renamed to d', 'new',173 self.assertEqual(['r1', 'modified', 'renamed to d', 'new',
175 'renamed from b'],174 'renamed from b'],
176 file_rev_stanza.get_all('revision'))175 file_rev_stanza.get_all('revision'))
177176
@@ -181,7 +180,7 @@
181 stanza = regen(check_for_clean=True, include_file_revisions=True)180 stanza = regen(check_for_clean=True, include_file_revisions=True)
182 file_rev_stanza = get_one_stanza(stanza, 'file-revisions')181 file_rev_stanza = get_one_stanza(stanza, 'file-revisions')
183 self.assertEqual(['', 'a', 'c', 'd'], file_rev_stanza.get_all('path'))182 self.assertEqual(['', 'a', 'c', 'd'], file_rev_stanza.get_all('path'))
184 self.assertEqual(['r4', 'r4', 'unversioned', 'removed'],183 self.assertEqual(['r1', 'r4', 'unversioned', 'removed'],
185 file_rev_stanza.get_all('revision'))184 file_rev_stanza.get_all('revision'))
186185
187 def test_python_null(self):186 def test_python_null(self):
188187
=== modified file 'bzrlib/workingtree.py'
--- bzrlib/workingtree.py 2009-08-14 02:35:01 +0000
+++ bzrlib/workingtree.py 2009-08-18 20:35:50 +0000
@@ -3030,10 +3030,10 @@
3030 return self.get_format_string()3030 return self.get_format_string()
30313031
30323032
3033__default_format = WorkingTreeFormat4()3033__default_format = WorkingTreeFormat6()
3034WorkingTreeFormat.register_format(__default_format)3034WorkingTreeFormat.register_format(__default_format)
3035WorkingTreeFormat.register_format(WorkingTreeFormat6())
3036WorkingTreeFormat.register_format(WorkingTreeFormat5())3035WorkingTreeFormat.register_format(WorkingTreeFormat5())
3036WorkingTreeFormat.register_format(WorkingTreeFormat4())
3037WorkingTreeFormat.register_format(WorkingTreeFormat3())3037WorkingTreeFormat.register_format(WorkingTreeFormat3())
3038WorkingTreeFormat.set_default_format(__default_format)3038WorkingTreeFormat.set_default_format(__default_format)
3039# formats which have no format string are not discoverable3039# formats which have no format string are not discoverable