107
100
If not None it must be a RevisionSpec list.
108
101
If one revision show compared it with working tree.
109
102
If two revisions show status between first and second.
110
:param short: If True, gives short SVN-style status lines.
111
:param versioned: If True, only shows versioned files.
113
104
if show_unchanged is not None:
114
105
warn("show_status_trees with show_unchanged has been deprecated "
140
129
raise errors.BzrCommandError(str(e))
146
_raise_if_nonexistent(specific_files, old, new)
147
want_unversioned = not versioned
149
changes = new._iter_changes(old, show_unchanged, specific_files,
150
require_versioned=False, want_unversioned=want_unversioned)
151
reporter = _mod_delta._ChangeReporter(output_file=to_file,
152
unversioned_filter=new.is_ignored)
153
_mod_delta.report_changes(changes, reporter)
155
delta = new.changes_from(old, want_unchanged=show_unchanged,
156
specific_files=specific_files,
157
want_unversioned=want_unversioned)
158
# filter out unknown files. We may want a tree method for
160
delta.unversioned = [unversioned for unversioned in
161
delta.unversioned if not new.is_ignored(unversioned[0])]
164
show_unchanged=show_unchanged,
166
conflict_title = False
167
# show the new conflicts only for now. XXX: get them from the delta.
168
for conflict in new.conflicts():
169
if not short and conflict_title is False:
170
print >> to_file, "conflicts:"
171
conflict_title = True
176
print >> to_file, "%s %s" % (prefix, conflict)
177
if new_is_working_tree and show_pending:
178
show_pending_merges(new, to_file, short)
132
_raise_if_nonexistent(specific_files, old, new)
133
delta = new.changes_from(old, want_unchanged=show_unchanged,
134
specific_files=specific_files)
137
show_unchanged=show_unchanged)
139
list_paths('unknown', new.unknowns(), specific_files, to_file)
140
conflict_title = False
141
# show the new conflicts only for now. XXX: get them from the delta.
142
for conflict in new.conflicts():
143
if conflict_title is False:
144
print >> to_file, "conflicts:"
145
conflict_title = True
146
print >> to_file, " %s" % conflict
147
if new_is_working_tree and show_pending:
148
show_pending_merges(new, to_file)
185
def show_pending_merges(new, to_file, short=False):
152
def show_pending_merges(new, to_file):
186
153
"""Write out a display of pending merges in a working tree."""
187
154
parents = new.get_parent_ids()
188
155
if len(parents) < 2:
209
175
from bzrlib.osutils import terminal_width
210
176
width = terminal_width()
211
177
m_revision = branch.repository.get_revision(merge)
216
print >> to_file, prefix, line_log(m_revision, width - 4)
178
print >> to_file, ' ', line_log(m_revision, width - 3)
217
179
inner_merges = branch.repository.get_ancestry(merge)
218
180
assert inner_merges[0] is None
219
181
inner_merges.pop(0)
222
184
if mmerge in ignore:
224
186
mm_revision = branch.repository.get_revision(mmerge)
229
print >> to_file, prefix, line_log(mm_revision, width - 5)
187
print >> to_file, ' ', line_log(mm_revision, width - 5)
230
188
ignore.add(mmerge)
231
189
except errors.NoSuchRevision:
236
print >> to_file, prefix, merge
190
print >> to_file, ' ', merge
192
def list_paths(header, paths, specific_files, to_file):
195
if specific_files and not is_inside_any(specific_files, path):
198
print >>to_file, '%s:' % header
200
print >>to_file, ' ', path