~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/status.py

- merge improved merge base selection from aaron
aaron.bentley@utoronto.ca-20050912025534-43d7275dd948e4ad

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
def show_status(branch, show_unchanged=False,
20
20
                specific_files=None,
21
21
                show_ids=False,
22
 
                to_file=None):
23
 
    """Display single-line status for non-ignored working files.
 
22
                to_file=None,
 
23
                show_pending=True):
 
24
    """Display status for non-ignored working files.
24
25
 
25
 
    show_all
26
 
        If true, show unmodified files too.
 
26
    show_unchanged
 
27
        If set, includes unchanged files.
27
28
 
28
29
    specific_files
29
30
        If set, only show the status of files in this list.
30
31
 
 
32
    show_ids
 
33
        If set, includes each file's id.
 
34
 
31
35
    to_file
32
36
        If set, write to this file (default stdout.)
 
37
 
 
38
    show_pending
 
39
        If set, write pending merges.
33
40
    """
34
41
    import sys
35
 
    from bzrlib.diff import compare_trees
 
42
    from bzrlib.delta import compare_trees
36
43
 
37
44
    if to_file == None:
38
45
        to_file = sys.stdout
62
69
                print >>to_file, 'unknown:'
63
70
                done_header = True
64
71
            print >>to_file, ' ', path
 
72
        if show_pending and len(branch.pending_merges()) > 0:
 
73
            print >>to_file, 'pending merges:'
 
74
            for merge in branch.pending_merges():
 
75
                print >> to_file, ' ', merge
65
76
    finally:
66
77
        branch.unlock()
67
78