~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/status.py

  • Committer: Martin Pool
  • Date: 2005-05-11 08:01:27 UTC
  • Revision ID: mbp@sourcefrog.net-20050511080127-4829697fc2ac64f1
- put back support for running diff or status on 
  only selected files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
 
19
19
def show_status(branch, show_unchanged=False,
20
 
                specific_files=None,
 
20
                file_list=None,
21
21
                show_ids=False):
22
22
    """Display single-line status for non-ignored working files.
23
23
 
24
24
    show_all
25
25
        If true, show unmodified files too.
26
26
 
27
 
    specific_files
 
27
    file_list
28
28
        If set, only show the status of files in this list.
29
29
    """
30
30
    import sys
36
36
    new = branch.working_tree()
37
37
 
38
38
    delta = diff.compare_trees(old, new, want_unchanged=show_unchanged,
39
 
                               specific_files=specific_files)
 
39
                               file_list=file_list)
40
40
 
41
41
    delta.show(sys.stdout, show_ids=show_ids,
42
42
               show_unchanged=show_unchanged)
44
44
    unknowns = new.unknowns()
45
45
    done_header = False
46
46
    for path in unknowns:
47
 
        # FIXME: Should also match if the unknown file is within a
48
 
        # specified directory.
49
 
        if specific_files:
50
 
            if path not in specific_files:
51
 
                continue
52
47
        if not done_header:
53
48
            print 'unknown:'
54
49
            done_header = True