322
322
_show_repository_stats(stats)
325
def describe_layout(repository=None, branch=None, tree=None):
326
"""Convert a control directory layout into a user-understandable term
328
Common outputs include "Standalone tree", "Repository branch" and
329
"Checkout". Uncommon outputs include "Unshared repository with trees"
330
and "Empty control directory"
332
if repository is None:
333
return 'Empty control directory'
334
if branch is None and tree is None:
335
if repository.is_shared():
336
phrase = 'Shared repository'
338
phrase = 'Unshared repository'
339
if repository.make_working_trees():
340
phrase += ' with trees'
343
if repository.is_shared():
344
independence = "Repository "
346
independence = "Standalone "
351
if branch is None and tree is not None:
352
phrase = "branchless tree"
354
if (tree is not None and tree.bzrdir.root_transport.base !=
355
branch.bzrdir.root_transport.base):
356
if independence == 'Standalone ':
358
phrase = "Lightweight checkout"
359
elif branch.get_bound_location() is not None:
360
if independence == 'Standalone ':
363
phrase = "Bound branch"
366
if independence != "":
367
phrase = phrase.lower()
368
return "%s%s" % (independence, phrase)
325
371
@deprecated_function(zero_eight)
326
372
def show_info(b):
327
373
"""Please see show_bzrdir_info."""