/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 breezy/tests/features.py

  • Committer: Jelmer Vernooij
  • Date: 2018-01-15 05:41:37 UTC
  • mfrom: (6478.3.5 support-backslash)
  • Revision ID: jelmer@jelmer.uk-20180115054137-uw1h5biynh8rjr98
merge lp:~jelmer/brz/support-backslash

Show diffs side-by-side

added added

removed removed

Lines of Context:
533
533
win32_feature = Win32Feature()
534
534
 
535
535
 
 
536
class _BackslashFilenameFeature(Feature):
 
537
    """Does the filesystem support backslashes in filenames?"""
 
538
 
 
539
    def _probe(self):
 
540
 
 
541
        try:
 
542
            fileno, name = tempfile.mkstemp(prefix='bzr\\prefix')
 
543
        except (IOError, OSError):
 
544
            return False
 
545
        else:
 
546
            try:
 
547
                os.stat(name)
 
548
            except (IOError, OSError):
 
549
                # mkstemp succeeded but the file wasn't actually created
 
550
                return False
 
551
            os.close(fileno)
 
552
            os.remove(name)
 
553
            return True
 
554
 
 
555
 
 
556
BackslashFilenameFeature = _BackslashFilenameFeature()
 
557
 
 
558
 
536
559
class _ColorFeature(Feature):
537
560
 
538
561
    def _probe(self):