~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/textui.py

  • Committer: Wouter van Heyst
  • Date: 2006-06-07 15:18:15 UTC
  • mto: This revision was merged to the branch mainline in revision 1752.
  • Revision ID: larstiq@larstiq.dyndns.org-20060607151815-78c1f021917b0e26
WorkingTree.remove takes an optional output file
bzr remove doesn't fail if it can't print the exact filename

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
# along with this program; if not, write to the Free Software
17
17
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
18
 
19
 
 
20
 
def show_status(state, kind, name):
 
19
import sys
 
20
 
 
21
 
 
22
def show_status(state, kind, name, to_file=None):
21
23
    if kind == 'directory':
22
24
        # use this even on windows?
23
25
        kind_ch = '/'
29
31
 
30
32
    assert len(state) == 1
31
33
        
32
 
    print state + '       ' + name + kind_ch
 
34
    if to_file is None:
 
35
        to_file = sys.stdout
 
36
 
 
37
    to_file.write(state + '       ' + name + kind_ch + '\n')
33
38