Merge lp:~mbp/bzr/408824-test-upgrade into lp:~bzr/bzr/trunk-old

Proposed by Martin Pool
Status: Merged
Merged at revision: not available
Proposed branch: lp:~mbp/bzr/408824-test-upgrade
Merge into: lp:~bzr/bzr/trunk-old
Diff against target: 123 lines
To merge this branch: bzr merge lp:~mbp/bzr/408824-test-upgrade
Reviewer Review Type Date Requested Status
Robert Collins (community) Approve
Review via email: mp+10146@code.launchpad.net

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

To post a comment you must log in.
Revision history for this message
Martin Pool (mbp) wrote : Posted in a previous version of this proposal

This does not yet fix bug 408824 but it does:

 * clean up this test to make the dependencies more clear

 * remove some copy&pasted code for checking compatibility

 * give a better message for incompatible repostiories

Revision history for this message
Robert Collins (lifeless) wrote : Posted in a previous version of this proposal

 review +1

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

this causes testfailures I think:
ERROR: blackbox.test_upgrade.TestWithUpgradableBranches.test_upgrade_up_to_date
    'function' object has no attribute 'rsplit'

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

> this causes testfailures I think:
> ERROR:
> blackbox.test_upgrade.TestWithUpgradableBranches.test_upgrade_up_to_date
> 'function' object has no attribute 'rsplit'

It does however reduce overall failures, so I'm merging it into my 2a default branch.

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

The new failure was actually from Martin's change to the registration of default-rich-root, so this branch is clean and I've submitted it.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'NEWS'
--- NEWS 2009-08-15 09:15:03 +0000
+++ NEWS 2009-08-17 20:36:46 +0000
@@ -58,6 +58,11 @@
58* StreamSource generates rich roots from non-rich root sources correctly58* StreamSource generates rich roots from non-rich root sources correctly
59 now. (Andrew Bennetts, #368921)59 now. (Andrew Bennetts, #368921)
6060
61* When deciding whether a repository was compatible for upgrading or
62 fetching, we previously incorrectly checked the default repository
63 format for the bzrdir format, rather than the format that was actually
64 present on disk. (Martin Pool, #408824)
65
61Improvements66Improvements
62************67************
6368
6469
=== modified file 'bzrlib/bzrdir.py'
--- bzrlib/bzrdir.py 2009-08-14 09:31:37 +0000
+++ bzrlib/bzrdir.py 2009-08-17 20:36:46 +0000
@@ -130,8 +130,7 @@
130130
131 def check_conversion_target(self, target_format):131 def check_conversion_target(self, target_format):
132 target_repo_format = target_format.repository_format132 target_repo_format = target_format.repository_format
133 source_repo_format = self._format.repository_format133 self.open_repository()._format.check_conversion_target(target_repo_format)
134 source_repo_format.check_conversion_target(target_repo_format)
135134
136 @staticmethod135 @staticmethod
137 def _check_supported(format, allow_unsupported,136 def _check_supported(format, allow_unsupported,
138137
=== modified file 'bzrlib/remote.py'
--- bzrlib/remote.py 2009-08-14 09:31:37 +0000
+++ bzrlib/remote.py 2009-08-17 20:36:46 +0000
@@ -566,17 +566,6 @@
566 def __eq__(self, other):566 def __eq__(self, other):
567 return self.__class__ is other.__class__567 return self.__class__ is other.__class__
568568
569 def check_conversion_target(self, target_format):
570 if self.rich_root_data and not target_format.rich_root_data:
571 raise errors.BadConversionTarget(
572 'Does not support rich root data.', target_format,
573 from_format=self)
574 if (self.supports_tree_reference and
575 not getattr(target_format, 'supports_tree_reference', False)):
576 raise errors.BadConversionTarget(
577 'Does not support nested trees', target_format,
578 from_format=self)
579
580 def network_name(self):569 def network_name(self):
581 if self._network_name:570 if self._network_name:
582 return self._network_name571 return self._network_name
583572
=== modified file 'bzrlib/repofmt/knitrepo.py'
--- bzrlib/repofmt/knitrepo.py 2009-08-14 09:37:57 +0000
+++ bzrlib/repofmt/knitrepo.py 2009-08-17 20:36:47 +0000
@@ -424,9 +424,6 @@
424 """See RepositoryFormat.get_format_description()."""424 """See RepositoryFormat.get_format_description()."""
425 return "Knit repository format 1"425 return "Knit repository format 1"
426426
427 def check_conversion_target(self, target_format):
428 pass
429
430427
431class RepositoryFormatKnit3(RepositoryFormatKnit):428class RepositoryFormatKnit3(RepositoryFormatKnit):
432 """Bzr repository knit format 3.429 """Bzr repository knit format 3.
433430
=== modified file 'bzrlib/repofmt/pack_repo.py'
--- bzrlib/repofmt/pack_repo.py 2009-08-14 09:37:57 +0000
+++ bzrlib/repofmt/pack_repo.py 2009-08-17 20:36:47 +0000
@@ -2529,9 +2529,6 @@
2529 """See RepositoryFormat.get_format_description()."""2529 """See RepositoryFormat.get_format_description()."""
2530 return "Packs containing knits without subtree support"2530 return "Packs containing knits without subtree support"
25312531
2532 def check_conversion_target(self, target_format):
2533 pass
2534
25352532
2536class RepositoryFormatKnitPack3(RepositoryFormatPack):2533class RepositoryFormatKnitPack3(RepositoryFormatPack):
2537 """A subtrees parameterized Pack repository.2534 """A subtrees parameterized Pack repository.
@@ -2647,9 +2644,6 @@
2647 """See RepositoryFormat.get_format_description()."""2644 """See RepositoryFormat.get_format_description()."""
2648 return "Packs 5 (adds stacking support, requires bzr 1.6)"2645 return "Packs 5 (adds stacking support, requires bzr 1.6)"
26492646
2650 def check_conversion_target(self, target_format):
2651 pass
2652
26532647
2654class RepositoryFormatKnitPack5RichRoot(RepositoryFormatPack):2648class RepositoryFormatKnitPack5RichRoot(RepositoryFormatPack):
2655 """A repository with rich roots and stacking.2649 """A repository with rich roots and stacking.
@@ -2771,9 +2765,6 @@
2771 """See RepositoryFormat.get_format_description()."""2765 """See RepositoryFormat.get_format_description()."""
2772 return "Packs 6 (uses btree indexes, requires bzr 1.9)"2766 return "Packs 6 (uses btree indexes, requires bzr 1.9)"
27732767
2774 def check_conversion_target(self, target_format):
2775 pass
2776
27772768
2778class RepositoryFormatKnitPack6RichRoot(RepositoryFormatPack):2769class RepositoryFormatKnitPack6RichRoot(RepositoryFormatPack):
2779 """A repository with rich roots, no subtrees, stacking and btree indexes.2770 """A repository with rich roots, no subtrees, stacking and btree indexes.
27802771
=== modified file 'bzrlib/repofmt/weaverepo.py'
--- bzrlib/repofmt/weaverepo.py 2009-04-09 20:23:07 +0000
+++ bzrlib/repofmt/weaverepo.py 2009-08-17 20:36:47 +0000
@@ -319,9 +319,6 @@
319 result.chk_bytes = None319 result.chk_bytes = None
320 return result320 return result
321321
322 def check_conversion_target(self, target_format):
323 pass
324
325322
326class RepositoryFormat4(PreSplitOutRepositoryFormat):323class RepositoryFormat4(PreSplitOutRepositoryFormat):
327 """Bzr repository format 4.324 """Bzr repository format 4.
@@ -494,9 +491,6 @@
494 """See RepositoryFormat.get_format_description()."""491 """See RepositoryFormat.get_format_description()."""
495 return "Weave repository format 7"492 return "Weave repository format 7"
496493
497 def check_conversion_target(self, target_format):
498 pass
499
500 def _get_inventories(self, repo_transport, repo, name='inventory'):494 def _get_inventories(self, repo_transport, repo, name='inventory'):
501 mapper = versionedfile.ConstantMapper(name)495 mapper = versionedfile.ConstantMapper(name)
502 return versionedfile.ThunkedVersionedFiles(repo_transport,496 return versionedfile.ThunkedVersionedFiles(repo_transport,