~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/osutils.py

  • Committer: mbp at sourcefrog
  • Date: 2005-03-11 06:24:40 UTC
  • Revision ID: mbp@sourcefrog.net-20050311062440-fd4ec249b6b139ab
don't abort on trees that happen to contain symlinks
(they still can't be versioned though).

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
18
 
19
19
import os, types, re, time, types
20
 
from stat import S_ISREG, S_ISDIR, ST_MODE, ST_SIZE
 
20
from stat import S_ISREG, S_ISDIR, S_ISLNK, ST_MODE, ST_SIZE
21
21
 
22
22
from errors import bailout
23
23
 
51
51
        return 'file'
52
52
    elif S_ISDIR(mode):
53
53
        return 'directory'
 
54
    elif S_ISLNK(mode):
 
55
        return 'symlink'
54
56
    else:
55
 
        bailout("can't handle file kind of %r" % fp)
 
57
        bailout("can't handle file kind with mode %o of %r" % (mode, f)) 
56
58
 
57
59
 
58
60