/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/textui.py

  • Committer: Martin Pool
  • Date: 2009-11-14 11:19:39 UTC
  • mto: This revision was merged to the branch mainline in revision 4828.
  • Revision ID: mbp@sourcefrog.net-20091114111939-8pghrh3fg2prgdlv
Move stubby show_status from bzrlib.textui into remove(), its only user

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
import sys
20
20
 
21
21
 
22
 
def show_status(state, kind, name, to_file=None):
23
 
    if kind == 'directory':
24
 
        # use this even on windows?
25
 
        kind_ch = '/'
26
 
    elif kind == 'symlink':
27
 
        kind_ch = '->'
28
 
    elif kind == 'file':
29
 
        kind_ch = ''
30
 
    else:
31
 
        raise ValueError(kind)
32
 
 
33
 
    if len(state) != 1:
34
 
        raise ValueError(state)
35
 
 
36
 
    if to_file is None:
37
 
        to_file = sys.stdout
38
 
 
39
 
    to_file.write(state + '       ' + name + kind_ch + '\n')
40