101
106
If not None it must be a RevisionSpec list.
102
107
If one revision show compared it with working tree.
103
108
If two revisions show status between first and second.
109
:param short: If True, gives short SVN-style status lines
105
111
if show_unchanged is not None:
106
112
warn("show_status_trees with show_unchanged has been deprecated "
135
141
_raise_if_nonexistent(specific_files, old, new)
136
delta = new.changes_from(old, want_unchanged=show_unchanged,
137
specific_files=specific_files)
140
show_unchanged=show_unchanged)
142
list_paths('unknown', new.unknowns(), specific_files, to_file)
143
specific_file_ids = tree.find_ids_across_trees(specific_files,
144
(old, new), require_versioned=False)
145
changes = new._iter_changes(old, show_unchanged,
147
reporter = _mod_delta.ChangeReporter(old.inventory,
149
_mod_delta.report_changes(changes, reporter)
151
delta = new.changes_from(old, want_unchanged=show_unchanged,
152
specific_files=specific_files)
155
show_unchanged=show_unchanged,
157
short_status_letter = '? '
159
short_status_letter = ''
160
list_paths('unknown', new.unknowns(), specific_files, to_file,
143
162
conflict_title = False
144
163
# show the new conflicts only for now. XXX: get them from the delta.
145
164
for conflict in new.conflicts():
146
if conflict_title is False:
165
if not short and conflict_title is False:
147
166
print >> to_file, "conflicts:"
148
167
conflict_title = True
149
print >> to_file, " %s" % conflict
172
print >> to_file, "%s %s" % (prefix, conflict)
150
173
if new_is_working_tree and show_pending:
151
show_pending_merges(new, to_file)
174
show_pending_merges(new, to_file, short)
155
def show_pending_merges(new, to_file):
178
def show_pending_merges(new, to_file, short=False):
156
179
"""Write out a display of pending merges in a working tree."""
157
180
parents = new.get_parent_ids()
158
181
if len(parents) < 2:
160
183
pending = parents[1:]
161
184
branch = new.branch
162
185
last_revision = parents[0]
163
print >>to_file, 'pending merges:'
187
print >>to_file, 'pending merges:'
164
188
if last_revision is not None:
166
190
ignore = set(branch.repository.get_ancestry(last_revision))
178
202
from bzrlib.osutils import terminal_width
179
203
width = terminal_width()
180
204
m_revision = branch.repository.get_revision(merge)
181
print >> to_file, ' ', line_log(m_revision, width - 3)
209
print >> to_file, prefix, line_log(m_revision, width - 4)
182
210
inner_merges = branch.repository.get_ancestry(merge)
183
211
assert inner_merges[0] is None
184
212
inner_merges.pop(0)
187
215
if mmerge in ignore:
189
217
mm_revision = branch.repository.get_revision(mmerge)
190
print >> to_file, ' ', line_log(mm_revision, width - 5)
222
print >> to_file, prefix, line_log(mm_revision, width - 5)
191
223
ignore.add(mmerge)
192
224
except errors.NoSuchRevision:
193
print >> to_file, ' ', merge
229
print >> to_file, prefix, merge
195
def list_paths(header, paths, specific_files, to_file):
231
def list_paths(header, paths, specific_files, to_file, short_status_letter=''):
196
232
done_header = False
197
233
for path in paths:
198
234
if specific_files and not is_inside_any(specific_files, path):
236
if not short_status_letter and not done_header:
201
237
print >>to_file, '%s:' % header
202
238
done_header = True
203
print >>to_file, ' ', path
239
print >>to_file, '%s %s' % (short_status_letter, path)