47
def _get_format_string(target):
48
"""Return format string of target.
50
Target must be of type bzrlib.workingtree, bzrlib.branch or
55
return target._format.get_format_string().rstrip()
56
except NotImplementedError:
57
return target.bzrdir._format # XXX: Use rstrip to be safe?
60
47
@deprecated_function(zero_eight)
62
49
"""Please see show_bzrdir_info."""
80
67
branch = working.branch
81
68
repository = branch.repository
82
working_format = _get_format_string(working)
83
branch_format = _get_format_string(branch)
84
repository_format = _get_format_string(repository)
85
# TODO: metadir_format = ...
69
control_format = working.bzrdir._format.get_format_description()
70
working_format = working._format.get_format_description()
71
branch_format = branch._format.get_format_description()
72
repository_format = repository._format.get_format_description()
88
75
if working.bzrdir != branch.bzrdir:
89
76
# Lightweight checkout
90
print ' checkout root: %s' % (
77
print ' checkout root: %s' % (
91
78
working.bzrdir.root_transport.base)
92
print ' checkout of branch: %s' % (
79
print ' checkout of branch: %s' % (
93
80
branch.bzrdir.root_transport.base)
95
82
# Standalone or bound branch (normal checkout)
96
print ' branch root: %s' % (
83
print ' branch root: %s' % (
97
84
branch.bzrdir.root_transport.base)
98
85
if branch.get_bound_location():
99
print ' bound to branch: %s' % branch.get_bound_location()
86
print ' bound to branch: %s' % branch.get_bound_location()
101
88
if repository.bzrdir != branch.bzrdir:
102
89
if repository.is_shared():
103
print ' shared repository: %s' % (
90
print ' shared repository: %s' % (
104
91
repository.bzrdir.root_transport.base)
106
print ' repository: %s' % (
93
print ' repository: %s' % (
107
94
repository.bzrdir.root_transport.base)
109
96
if branch.get_parent():
110
print ' parent branch: %s' % branch.get_parent()
97
print ' parent branch: %s' % branch.get_parent()
111
98
if branch.get_push_location():
112
print ' push to branch: %s' % branch.get_push_location()
99
print ' push to branch: %s' % branch.get_push_location()
116
if working_format == branch_format == repository_format:
117
print ' branch format: %s' % branch_format
119
# TODO: print 'meta directory format: %s' % metadir_format
120
print ' working tree format: %s' % working_format
121
print ' branch format: %s' % branch_format
122
print ' repository format: %s' % repository_format
103
print ' control: %s' % control_format
104
print ' working tree: %s' % working_format
105
print ' branch: %s' % branch_format
106
print ' repository: %s' % repository_format
124
108
basis = working.basis_tree()
125
109
work_inv = working.inventory