~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/status.py

[merge] bzr.dev 2294

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
import sys
18
18
 
 
19
from bzrlib import (
 
20
    delta as _mod_delta,
 
21
    tree,
 
22
    )
19
23
from bzrlib.diff import _raise_if_nonexistent
20
24
import bzrlib.errors as errors
21
25
from bzrlib.log import line_log
138
142
        new.lock_read()
139
143
        try:
140
144
            _raise_if_nonexistent(specific_files, old, new)
141
 
            delta = new.changes_from(old, want_unchanged=show_unchanged,
142
 
                                  specific_files=specific_files)
143
 
            delta.show(to_file,
144
 
                       show_ids=show_ids,
145
 
                       show_unchanged=show_unchanged,
146
 
                       short_status=short)
147
 
            short_status_letter = '?'
 
145
            if short:
 
146
                specific_file_ids = tree.find_ids_across_trees(specific_files,
 
147
                    (old, new), require_versioned=False)
 
148
                changes = new._iter_changes(old, show_unchanged,
 
149
                                            specific_file_ids)
 
150
                reporter = _mod_delta.ChangeReporter(old.inventory,
 
151
                    output_file=to_file)
 
152
                _mod_delta.report_changes(changes, reporter)
 
153
            else:
 
154
                delta = new.changes_from(old, want_unchanged=show_unchanged,
 
155
                                      specific_files=specific_files)
 
156
                delta.show(to_file,
 
157
                           show_ids=show_ids,
 
158
                           show_unchanged=show_unchanged,
 
159
                           short_status=short)
 
160
            short_status_letter = '? '
148
161
            if not short:
149
162
                short_status_letter = ''
150
163
            list_paths('unknown', new.unknowns(), specific_files, to_file,
156
169
                    print >> to_file, "conflicts:"
157
170
                    conflict_title = True
158
171
                if short:
159
 
                    prefix = 'C '
 
172
                    prefix = 'C  '
160
173
                else:
161
174
                    prefix = ' '
162
175
                print >> to_file, "%s %s" % (prefix, conflict)
196
209
            width = terminal_width()
197
210
            m_revision = branch.repository.get_revision(merge)
198
211
            if short:
199
 
                prefix = 'P '
 
212
                prefix = 'P  '
200
213
            else:
201
214
                prefix = ' '
202
215
            print >> to_file, prefix, line_log(m_revision, width - 4)
209
222
                    continue
210
223
                mm_revision = branch.repository.get_revision(mmerge)
211
224
                if short:
212
 
                    prefix = 'P. '
 
225
                    prefix = 'P.  '
213
226
                else:
214
227
                    prefix = '   '
215
228
                print >> to_file, prefix, line_log(mm_revision, width - 5)
216
229
                ignore.add(mmerge)
217
230
        except errors.NoSuchRevision:
218
231
            if short:
219
 
                prefix = 'P '
 
232
                prefix = 'P  '
220
233
            else:
221
234
                prefix = ' '
222
235
            print >> to_file, prefix, merge