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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
18
from urllib import quote
127
127
def test_describe_tree_format(self):
128
128
for key in bzrdir.format_registry.keys():
129
if key in bzrdir.format_registry.aliases():
131
131
self.assertTreeDescription(key)
133
133
def test_describe_checkout_format(self):
134
134
for key in bzrdir.format_registry.keys():
135
if key in bzrdir.format_registry.aliases():
136
# Aliases will not describe correctly in the UI because the
137
# real format is found.
139
# legacy: weave does not support checkouts
142
if bzrdir.format_registry.get_info(key).experimental:
143
# We don't require that experimental formats support checkouts
144
# or describe correctly in the UI.
146
if bzrdir.format_registry.get_info(key).hidden:
135
if key in ('default', 'weave', 'experimental'):
137
if key.startswith('experimental-'):
138
# these are typically hidden or aliases for other formats
149
if key in ('pack-0.92',):
150
expected = 'pack-0.92'
151
elif key in ('knit', 'metaweave'):
141
if key in ('dirstate', 'dirstate-tags', 'dirstate-with-subtree',
142
'knitpack-experimental', 'knitpack-subtree-experimental'):
143
expected = 'dirstate or dirstate-tags or knitpack-experimental'
144
if key in ('knit', 'metaweave'):
152
145
expected = 'knit or metaweave'
153
elif key in ('1.14', '1.14-rich-root'):
154
expected = '1.14 or 1.14-rich-root'
155
146
self.assertCheckoutDescription(key, expected)
157
148
def test_describe_branch_format(self):
158
149
for key in bzrdir.format_registry.keys():
159
if key in bzrdir.format_registry.aliases():
161
if bzrdir.format_registry.get_info(key).hidden:
164
153
if key in ('dirstate', 'knit'):
165
154
expected = 'dirstate or knit'
166
elif key in ('1.14',):
168
elif key in ('1.14-rich-root',):
169
expected = '1.14-rich-root'
170
155
self.assertBranchDescription(key, expected)
172
157
def test_describe_repo_format(self):
173
158
for key in bzrdir.format_registry.keys():
174
if key in bzrdir.format_registry.aliases():
176
if bzrdir.format_registry.get_info(key).hidden:
179
162
if key in ('dirstate', 'knit', 'dirstate-tags'):
180
163
expected = 'dirstate or dirstate-tags or knit'
181
elif key in ('1.14',):
183
elif key in ('1.14-rich-root',):
184
expected = '1.14-rich-root'
185
164
self.assertRepoDescription(key, expected)
187
166
format = bzrdir.format_registry.make_bzrdir('metaweave')