/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/status.py

  • Committer: Arnaud Jeansen
  • Date: 2010-04-07 21:34:13 UTC
  • mto: This revision was merged to the branch mainline in revision 5161.
  • Revision ID: arnaud.jeansen@gmail.com-20100407213413-vj7jf30ajwnik6jb
Make new unit test easier to read wrt. sorting

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
    delta as _mod_delta,
21
21
    log,
22
22
    osutils,
 
23
    tree,
23
24
    tsort,
24
25
    revision as _mod_revision,
25
26
    )
26
27
import bzrlib.errors as errors
 
28
from bzrlib.osutils import is_inside_any
 
29
from bzrlib.symbol_versioning import (deprecated_function,
 
30
        )
27
31
from bzrlib.trace import mutter, warning
28
32
 
29
33
# TODO: when showing single-line logs, truncate to the width of the terminal
152
156
        try:
153
157
            specific_files, nonexistents \
154
158
                = _filter_nonexistent(specific_files, old, new)
 
159
            # If we request the status of one specific file when this file should be ignored,
 
160
            # warn the user to avoid any confusion
 
161
            if specific_files and len(specific_files) == 1 and new.is_ignored(specific_files[0]):
 
162
                warning("File %s is marked as ignored, see 'bzr help ignore'" % specific_files[0])
155
163
            want_unversioned = not versioned
156
164
 
157
165
            # Reporter used for short outputs
162
170
                           short=short, want_unchanged=show_unchanged, 
163
171
                           want_unversioned=want_unversioned, show_ids=show_ids)
164
172
 
165
 
            # show the ignored files among specific files (i.e. show the files
166
 
            # identified from input that we choose to ignore). 
167
 
            if specific_files is not None:
168
 
                # Ignored files is sorted because specific_files is already sorted
169
 
                ignored_files = [specific for specific in
170
 
                    specific_files if new.is_ignored(specific)]
171
 
                if len(ignored_files) > 0 and not short:
172
 
                    to_file.write("ignored:\n")
173
 
                    prefix = ' '
174
 
                else:
175
 
                    prefix = 'I  '
176
 
                for ignored_file in ignored_files:
177
 
                    to_file.write("%s %s\n" % (prefix, ignored_file))
178
 
 
179
173
            # show the new conflicts only for now. XXX: get them from the
180
174
            # delta.
181
175
            conflicts = new.conflicts()