101
102
If not None it must be a RevisionSpec list.
102
103
If one revision show compared it with working tree.
103
104
If two revisions show status between first and second.
105
:param short: If True, gives short SVN-style status lines
105
107
if show_unchanged is not None:
106
108
warn("show_status_trees with show_unchanged has been deprecated "
137
139
specific_files=specific_files)
138
140
delta.show(to_file,
139
141
show_ids=show_ids,
140
show_unchanged=show_unchanged)
142
list_paths('unknown', new.unknowns(), specific_files, to_file)
142
show_unchanged=show_unchanged,
144
short_status_letter = '?'
146
short_status_letter = ''
147
list_paths('unknown', new.unknowns(), specific_files, to_file,
143
149
conflict_title = False
144
150
# show the new conflicts only for now. XXX: get them from the delta.
145
151
for conflict in new.conflicts():
146
if conflict_title is False:
152
if not short and conflict_title is False:
147
153
print >> to_file, "conflicts:"
148
154
conflict_title = True
149
print >> to_file, " %s" % conflict
159
print >> to_file, "%s %s" % (prefix, conflict)
150
160
if new_is_working_tree and show_pending:
151
show_pending_merges(new, to_file)
161
show_pending_merges(new, to_file, short)
155
def show_pending_merges(new, to_file):
165
def show_pending_merges(new, to_file, short=False):
156
166
"""Write out a display of pending merges in a working tree."""
157
167
parents = new.get_parent_ids()
158
168
if len(parents) < 2:
160
170
pending = parents[1:]
161
171
branch = new.branch
162
172
last_revision = parents[0]
163
print >>to_file, 'pending merges:'
174
print >>to_file, 'pending merges:'
164
175
if last_revision is not None:
166
177
ignore = set(branch.repository.get_ancestry(last_revision))
178
189
from bzrlib.osutils import terminal_width
179
190
width = terminal_width()
180
191
m_revision = branch.repository.get_revision(merge)
181
print >> to_file, ' ', line_log(m_revision, width - 3)
196
print >> to_file, prefix, line_log(m_revision, width - 4)
182
197
inner_merges = branch.repository.get_ancestry(merge)
183
198
assert inner_merges[0] is None
184
199
inner_merges.pop(0)
187
202
if mmerge in ignore:
189
204
mm_revision = branch.repository.get_revision(mmerge)
190
print >> to_file, ' ', line_log(mm_revision, width - 5)
209
print >> to_file, prefix, line_log(mm_revision, width - 5)
191
210
ignore.add(mmerge)
192
211
except errors.NoSuchRevision:
193
print >> to_file, ' ', merge
216
print >> to_file, prefix, merge
195
def list_paths(header, paths, specific_files, to_file):
218
def list_paths(header, paths, specific_files, to_file, short_status_letter=''):
196
219
done_header = False
197
220
for path in paths:
198
221
if specific_files and not is_inside_any(specific_files, path):
223
if not short_status_letter and not done_header:
201
224
print >>to_file, '%s:' % header
202
225
done_header = True
203
print >>to_file, ' ', path
226
print >>to_file, '%s %s' % (short_status_letter, path)