48
def _get_format_string(object):
49
"""Return format string of object, where object is of type
50
bzrlib.workingtree, bzrlib.branch or bzrlib.repository.
48
def _get_format_string(target):
49
"""Return format string of target.
51
Target must be of type bzrlib.workingtree, bzrlib.branch or
53
return object._format.get_format_string().rstrip()
56
return target._format.get_format_string().rstrip()
54
57
except NotImplementedError:
55
return object.bzrdir._format # FIXME Use rstrip to be safe?
58
return target.bzrdir._format # XXX: Use rstrip to be safe?
58
61
@deprecated_function(zero_eight)
80
83
working_format = _get_format_string(working)
81
84
branch_format = _get_format_string(branch)
82
85
repository_format = _get_format_string(repository)
83
# TODO metadir_format = ...
86
# TODO: metadir_format = ...
86
89
print ' working.bzrdir = %s' % working.bzrdir.root_transport.base
99
102
if working.bzrdir != branch.bzrdir:
100
103
# Lightweight checkout
101
print ' checkout root: %s' \
102
% working.bzrdir.root_transport.base
103
print ' checkout of branch: %s' \
104
% branch.bzrdir.root_transport.base
104
print ' checkout root: %s' % (
105
working.bzrdir.root_transport.base)
106
print ' checkout of branch: %s' % (
107
branch.bzrdir.root_transport.base)
106
109
# Standalone or bound branch (normal checkout)
107
print ' branch root: %s' \
108
% branch.bzrdir.root_transport.base
110
print ' branch root: %s' % (
111
branch.bzrdir.root_transport.base)
109
112
if branch.get_bound_location():
110
113
print ' bound to branch: %s' % branch.get_bound_location()
112
115
if repository.bzrdir != branch.bzrdir:
113
116
if repository.is_shared():
114
print ' shared repository: %s' \
115
% repository.bzrdir.root_transport.base
117
print ' shared repository: %s' % (
118
repository.bzrdir.root_transport.base)
117
print ' repository: %s' \
118
% repository.bzrdir.root_transport.base
120
print ' repository: %s' % (
121
repository.bzrdir.root_transport.base)
120
123
if branch.get_parent():
121
124
print ' parent branch: %s' % branch.get_parent()
127
130
if working_format == branch_format == repository_format:
128
131
print ' branch format: %s' % branch_format
130
# TODO print 'meta directory format: %s' % metadir_format
133
# TODO: print 'meta directory format: %s' % metadir_format
131
134
print ' working tree format: %s' % working_format
132
135
print ' branch format: %s' % branch_format
133
136
print ' repository format: %s' % repository_format