~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/status.py

  • Committer: Martin Pool
  • Date: 2005-05-17 06:56:16 UTC
  • Revision ID: mbp@sourcefrog.net-20050517065616-6f23381d6184a8aa
- add space for un-merged patches

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
        If set, only show the status of files in this list.
29
29
    """
30
30
    import sys
31
 
    from bzrlib.diff import compare_trees
32
 
    
33
 
    branch.lock_read()
34
 
    try:
35
 
 
36
 
        old = branch.basis_tree()
37
 
        new = branch.working_tree()
38
 
 
39
 
        delta = compare_trees(old, new, want_unchanged=show_unchanged,
40
 
                              specific_files=specific_files)
41
 
 
42
 
        delta.show(sys.stdout, show_ids=show_ids,
43
 
                   show_unchanged=show_unchanged)
44
 
 
45
 
        unknowns = new.unknowns()
46
 
        done_header = False
47
 
        for path in unknowns:
48
 
            # FIXME: Should also match if the unknown file is within a
49
 
            # specified directory.
50
 
            if specific_files:
51
 
                if path not in specific_files:
52
 
                    continue
53
 
            if not done_header:
54
 
                print 'unknown:'
55
 
                done_header = True
56
 
            print ' ', path
57
 
    finally:
58
 
        branch.unlock()
59
 
        
 
31
    import diff
 
32
    
 
33
    branch._need_readlock()
 
34
    
 
35
    old = branch.basis_tree()
 
36
    new = branch.working_tree()
 
37
 
 
38
    delta = diff.compare_trees(old, new, want_unchanged=show_unchanged,
 
39
                               specific_files=specific_files)
 
40
 
 
41
    delta.show(sys.stdout, show_ids=show_ids,
 
42
               show_unchanged=show_unchanged)
 
43
 
 
44
    unknowns = new.unknowns()
 
45
    done_header = False
 
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
        if not done_header:
 
53
            print 'unknown:'
 
54
            done_header = True
 
55
        print ' ', path