~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_info.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-09-01 08:02:42 UTC
  • mfrom: (5390.3.3 faster-revert-593560)
  • Revision ID: pqm@pqm.ubuntu.com-20100901080242-esg62ody4frwmy66
(spiv) Avoid repeatedly calling self.target.all_file_ids() in
 InterTree.iter_changes. (Andrew Bennetts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2007 Canonical Ltd
 
1
# Copyright (C) 2007-2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
import sys
18
18
from urllib import quote
143
143
                # We don't require that experimental formats support checkouts
144
144
                # or describe correctly in the UI.
145
145
                continue
 
146
            if bzrdir.format_registry.get_info(key).hidden:
 
147
                continue
146
148
            expected = None
147
 
            if key in ('dirstate', 'dirstate-tags', 'dirstate-with-subtree',
148
 
                'pack-0.92', 'pack-0.92-subtree', 'rich-root',
149
 
                'rich-root-pack', '1.6', '1.6.1-rich-root',
150
 
                '1.9', '1.9-rich-root'):
151
 
                expected = '1.6 or 1.6.1-rich-root or ' \
152
 
                    '1.9 or 1.9-rich-root or ' \
153
 
                    'dirstate or dirstate-tags or pack-0.92 or'\
154
 
                    ' rich-root or rich-root-pack'
 
149
            if key in ('pack-0.92',):
 
150
                expected = 'pack-0.92'
155
151
            elif key in ('knit', 'metaweave'):
156
152
                expected = 'knit or metaweave'
157
 
            elif key in ('development-wt5', 'development-wt5-rich-root'):
158
 
                expected = 'development-wt5 or development-wt5-rich-root'
 
153
            elif key in ('1.14', '1.14-rich-root'):
 
154
                expected = '1.14 or 1.14-rich-root'
159
155
            self.assertCheckoutDescription(key, expected)
160
156
 
161
157
    def test_describe_branch_format(self):
162
158
        for key in bzrdir.format_registry.keys():
163
159
            if key in bzrdir.format_registry.aliases():
164
160
                continue
 
161
            if bzrdir.format_registry.get_info(key).hidden:
 
162
                continue
165
163
            expected = None
166
164
            if key in ('dirstate', 'knit'):
167
165
                expected = 'dirstate or knit'
168
 
            elif key in ('1.9', 'development-wt5'):
169
 
                expected = '1.9 or development-wt5'
170
 
            elif key in ('1.9-rich-root', 'development-wt5-rich-root'):
171
 
                expected = '1.9-rich-root or development-wt5-rich-root'
 
166
            elif key in ('1.14',):
 
167
                expected = '1.14'
 
168
            elif key in ('1.14-rich-root',):
 
169
                expected = '1.14-rich-root'
172
170
            self.assertBranchDescription(key, expected)
173
171
 
174
172
    def test_describe_repo_format(self):
175
173
        for key in bzrdir.format_registry.keys():
176
174
            if key in bzrdir.format_registry.aliases():
177
175
                continue
 
176
            if bzrdir.format_registry.get_info(key).hidden:
 
177
                continue
178
178
            expected = None
179
179
            if key in ('dirstate', 'knit', 'dirstate-tags'):
180
180
                expected = 'dirstate or dirstate-tags or knit'
181
 
            elif key in ('1.9', 'development-wt5'):
182
 
                expected = '1.9 or development-wt5'
183
 
            elif key in ('1.9-rich-root', 'development-wt5-rich-root'):
184
 
                expected = '1.9-rich-root or development-wt5-rich-root'
 
181
            elif key in ('1.14',):
 
182
                expected = '1.14'
 
183
            elif key in ('1.14-rich-root',):
 
184
                expected = '1.14-rich-root'
185
185
            self.assertRepoDescription(key, expected)
186
186
 
187
187
        format = bzrdir.format_registry.make_bzrdir('metaweave')