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
1=== modified file 'NEWS'
2--- NEWS 2009-08-15 09:15:03 +0000
3+++ NEWS 2009-08-17 20:36:46 +0000
4@@ -58,6 +58,11 @@
5 * StreamSource generates rich roots from non-rich root sources correctly
6 now. (Andrew Bennetts, #368921)
7
8+* When deciding whether a repository was compatible for upgrading or
9+ fetching, we previously incorrectly checked the default repository
10+ format for the bzrdir format, rather than the format that was actually
11+ present on disk. (Martin Pool, #408824)
12+
13 Improvements
14 ************
15
16
17=== modified file 'bzrlib/bzrdir.py'
18--- bzrlib/bzrdir.py 2009-08-14 09:31:37 +0000
19+++ bzrlib/bzrdir.py 2009-08-17 20:36:46 +0000
20@@ -130,8 +130,7 @@
21
22 def check_conversion_target(self, target_format):
23 target_repo_format = target_format.repository_format
24- source_repo_format = self._format.repository_format
25- source_repo_format.check_conversion_target(target_repo_format)
26+ self.open_repository()._format.check_conversion_target(target_repo_format)
27
28 @staticmethod
29 def _check_supported(format, allow_unsupported,
30
31=== modified file 'bzrlib/remote.py'
32--- bzrlib/remote.py 2009-08-14 09:31:37 +0000
33+++ bzrlib/remote.py 2009-08-17 20:36:46 +0000
34@@ -566,17 +566,6 @@
35 def __eq__(self, other):
36 return self.__class__ is other.__class__
37
38- def check_conversion_target(self, target_format):
39- if self.rich_root_data and not target_format.rich_root_data:
40- raise errors.BadConversionTarget(
41- 'Does not support rich root data.', target_format,
42- from_format=self)
43- if (self.supports_tree_reference and
44- not getattr(target_format, 'supports_tree_reference', False)):
45- raise errors.BadConversionTarget(
46- 'Does not support nested trees', target_format,
47- from_format=self)
48-
49 def network_name(self):
50 if self._network_name:
51 return self._network_name
52
53=== modified file 'bzrlib/repofmt/knitrepo.py'
54--- bzrlib/repofmt/knitrepo.py 2009-08-14 09:37:57 +0000
55+++ bzrlib/repofmt/knitrepo.py 2009-08-17 20:36:47 +0000
56@@ -424,9 +424,6 @@
57 """See RepositoryFormat.get_format_description()."""
58 return "Knit repository format 1"
59
60- def check_conversion_target(self, target_format):
61- pass
62-
63
64 class RepositoryFormatKnit3(RepositoryFormatKnit):
65 """Bzr repository knit format 3.
66
67=== modified file 'bzrlib/repofmt/pack_repo.py'
68--- bzrlib/repofmt/pack_repo.py 2009-08-14 09:37:57 +0000
69+++ bzrlib/repofmt/pack_repo.py 2009-08-17 20:36:47 +0000
70@@ -2529,9 +2529,6 @@
71 """See RepositoryFormat.get_format_description()."""
72 return "Packs containing knits without subtree support"
73
74- def check_conversion_target(self, target_format):
75- pass
76-
77
78 class RepositoryFormatKnitPack3(RepositoryFormatPack):
79 """A subtrees parameterized Pack repository.
80@@ -2647,9 +2644,6 @@
81 """See RepositoryFormat.get_format_description()."""
82 return "Packs 5 (adds stacking support, requires bzr 1.6)"
83
84- def check_conversion_target(self, target_format):
85- pass
86-
87
88 class RepositoryFormatKnitPack5RichRoot(RepositoryFormatPack):
89 """A repository with rich roots and stacking.
90@@ -2771,9 +2765,6 @@
91 """See RepositoryFormat.get_format_description()."""
92 return "Packs 6 (uses btree indexes, requires bzr 1.9)"
93
94- def check_conversion_target(self, target_format):
95- pass
96-
97
98 class RepositoryFormatKnitPack6RichRoot(RepositoryFormatPack):
99 """A repository with rich roots, no subtrees, stacking and btree indexes.
100
101=== modified file 'bzrlib/repofmt/weaverepo.py'
102--- bzrlib/repofmt/weaverepo.py 2009-04-09 20:23:07 +0000
103+++ bzrlib/repofmt/weaverepo.py 2009-08-17 20:36:47 +0000
104@@ -319,9 +319,6 @@
105 result.chk_bytes = None
106 return result
107
108- def check_conversion_target(self, target_format):
109- pass
110-
111
112 class RepositoryFormat4(PreSplitOutRepositoryFormat):
113 """Bzr repository format 4.
114@@ -494,9 +491,6 @@
115 """See RepositoryFormat.get_format_description()."""
116 return "Weave repository format 7"
117
118- def check_conversion_target(self, target_format):
119- pass
120-
121 def _get_inventories(self, repo_transport, repo, name='inventory'):
122 mapper = versionedfile.ConstantMapper(name)
123 return versionedfile.ThunkedVersionedFiles(repo_transport,