~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/status.py

merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
import sys
18
18
 
19
 
from bzrlib.delta import compare_trees
20
19
from bzrlib.diff import _raise_if_nonexistent
21
20
import bzrlib.errors as errors
22
21
from bzrlib.log import line_log
131
130
            else:
132
131
                new = wt
133
132
        _raise_if_nonexistent(specific_files, old, new)
134
 
        delta = compare_trees(old, new, want_unchanged=show_unchanged,
 
133
        delta = new.changes_from(old, want_unchanged=show_unchanged,
135
134
                              specific_files=specific_files)
136
135
        delta.show(to_file,
137
136
                   show_ids=show_ids,
138
137
                   show_unchanged=show_unchanged)
139
138
 
140
 
        if new_is_working_tree:
141
 
            list_paths('unknown', new.unknowns(), specific_files, to_file)
142
 
            conflict_title = False
143
 
            for conflict in wt.conflicts():
144
 
                if conflict_title is False:
145
 
                    print >> to_file, "conflicts:"
146
 
                    conflict_title = True
147
 
                print >> to_file, "  %s" % conflict
 
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
148
147
        if new_is_working_tree and show_pending:
149
148
            show_pending_merges(new, to_file)
150
149
    finally:
165
164
    for merge in new.pending_merges():
166
165
        ignore.add(merge)
167
166
        try:
 
167
            from bzrlib.osutils import terminal_width
 
168
            width = terminal_width()
168
169
            m_revision = branch.repository.get_revision(merge)
169
 
            print >> to_file, ' ', line_log(m_revision, 77)
 
170
            print >> to_file, ' ', line_log(m_revision, width - 3)
170
171
            inner_merges = branch.repository.get_ancestry(merge)
171
172
            assert inner_merges[0] == None
172
173
            inner_merges.pop(0)
175
176
                if mmerge in ignore:
176
177
                    continue
177
178
                mm_revision = branch.repository.get_revision(mmerge)
178
 
                print >> to_file, '   ', line_log(mm_revision, 75)
 
179
                print >> to_file, '   ', line_log(mm_revision, width - 5)
179
180
                ignore.add(mmerge)
180
181
        except errors.NoSuchRevision:
181
182
            print >> to_file, ' ', merge