~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/textui.py

  • Committer: Martin Pool
  • Date: 2009-08-14 12:08:08 UTC
  • mto: This revision was merged to the branch mainline in revision 4614.
  • Revision ID: mbp@sourcefrog.net-20090814120808-4gvx7fhg44z29cj3
Use platform(aliased=1)

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
#
15
15
# You should have received a copy of the GNU General Public License
16
16
# along with this program; if not, write to the Free Software
17
 
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
17
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
18
 
19
19
import sys
20
20
 
25
25
        kind_ch = '/'
26
26
    elif kind == 'symlink':
27
27
        kind_ch = '->'
 
28
    elif kind == 'file':
 
29
        kind_ch = ''
28
30
    else:
29
 
        assert kind == 'file', ("can't handle file of type %r" % kind)
30
 
        kind_ch = ''
31
 
 
32
 
    assert len(state) == 1
33
 
        
 
31
        raise ValueError(kind)
 
32
 
 
33
    if len(state) != 1:
 
34
        raise ValueError(state)
 
35
 
34
36
    if to_file is None:
35
37
        to_file = sys.stdout
36
38
 
37
39
    to_file.write(state + '       ' + name + kind_ch + '\n')
38
 
    
 
40