/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 bzrlib/tests/__init__.py

  • Committer: Alexander Belchenko
  • Date: 2007-12-01 21:59:46 UTC
  • mto: This revision was merged to the branch mainline in revision 3064.
  • Revision ID: bialix@ukr.net-20071201215946-cv7sc7jdv2czuisf
Catch OSError 17 (file exists) in final phase of tree transform and show filename to user (#111758).

Show diffs side-by-side

added added

removed removed

Lines of Context:
2771
2771
        return 'FTPServer'
2772
2772
 
2773
2773
FTPServerFeature = _FTPServerFeature()
 
2774
 
 
2775
 
 
2776
class _CaseInsensitiveFilesystemFeature(Feature):
 
2777
    """Check if underlined filesystem is case-insensitive
 
2778
    (e.g. on Windows, Cygwin, MacOS)
 
2779
    """
 
2780
 
 
2781
    def _probe(self):
 
2782
        if TestCaseWithMemoryTransport.TEST_ROOT is None:
 
2783
            root = osutils.mkdtemp(prefix='testbzr-', suffix='.tmp')
 
2784
            TestCaseWithMemoryTransport.TEST_ROOT = root
 
2785
        else:
 
2786
            root = TestCaseWithMemoryTransport.TEST_ROOT
 
2787
        tdir = osutils.mkdtemp(prefix='case-sensitive-probe-', suffix='',
 
2788
            dir=root)
 
2789
        name_a = osutils.pathjoin(tdir, 'a')
 
2790
        name_A = osutils.pathjoin(tdir, 'A')
 
2791
        os.mkdir(name_a)
 
2792
        result = osutils.isdir(name_A)
 
2793
        _rmtree_temp_dir(tdir)
 
2794
        return result
 
2795
 
 
2796
    def feature_name(self):
 
2797
        return 'case-insensitive filesystem'
 
2798
 
 
2799
CaseInsensitiveFilesystemFeature = _CaseInsensitiveFilesystemFeature()