~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree_4.py

  • Committer: John Arbash Meinel
  • Date: 2008-03-17 20:11:30 UTC
  • mto: This revision was merged to the branch mainline in revision 3532.
  • Revision ID: john@arbash-meinel.com-20080317201130-254scn9jqanfvc92
Raise a clear error about the offending filename when there is a filename with bad characters.
Related to bug #77657

Show diffs side-by-side

added added

removed removed

Lines of Context:
2414
2414
                                new_executable = bool(
2415
2415
                                    stat.S_ISREG(current_path_info[3].st_mode)
2416
2416
                                    and stat.S_IEXEC & current_path_info[3].st_mode)
 
2417
                                try:
 
2418
                                    relpath_unicode = utf8_decode(current_path_info[0])[0]
 
2419
                                except UnicodeDecodeError:
 
2420
                                    raise errors.BadFilenameEncoding(
 
2421
                                        current_path_info[0], osutils._fs_enc)
2417
2422
                                yield (None,
2418
 
                                    (None, utf8_decode(current_path_info[0])[0]),
 
2423
                                    (None, relpath_unicode),
2419
2424
                                    True,
2420
2425
                                    (False, False),
2421
2426
                                    (None, None),