141
140
% (self._module, self._name))
142
141
use_msg = ' Use %s.%s instead.' % (self._replacement_module,
143
142
self._replacement_name)
144
symbol_versioning.warn(depr_msg + use_msg, DeprecationWarning)
143
symbol_versioning.warn(depr_msg + use_msg, DeprecationWarning,
145
145
# Import the new feature and use it as a replacement for the
146
146
# deprecated one.
147
147
self._feature = pyutils.get_named_object(
290
290
if CaseInsCasePresFilenameFeature.available():
293
from bzrlib import tests
293
295
if tests.TestCaseWithMemoryTransport.TEST_ROOT is None:
294
296
root = osutils.mkdtemp(prefix='testbzr-', suffix='.tmp')
295
297
tests.TestCaseWithMemoryTransport.TEST_ROOT = root
409
411
bash_feature = ExecutableFeature('bash')
412
diff_feature = ExecutableFeature('diff')
410
413
sed_feature = ExecutableFeature('sed')
411
diff_feature = ExecutableFeature('diff')
414
msgmerge_feature = ExecutableFeature('msgmerge')
414
417
class _PosixPermissionsFeature(Feature):
421
424
f = tempfile.mkstemp(prefix='bzr_perms_chk_')
424
os.chmod(name, write_perms)
427
osutils.chmod_if_possible(name, write_perms)
426
429
read_perms = os.stat(name).st_mode & 0777
492
495
win32_feature = Win32Feature()
495
for name in ['HTTPServerFeature',
496
'HTTPSServerFeature', 'SymlinkFeature', 'HardlinkFeature',
497
'OsFifoFeature', 'UnicodeFilenameFeature',
498
'ByteStringNamedFilesystem', 'UTF8Filesystem',
499
'BreakinFeature', 'CaseInsCasePresFilenameFeature',
500
'CaseInsensitiveFilesystemFeature', 'case_sensitive_filesystem_feature',
501
'posix_permissions_feature',
503
setattr(tests, name, _CompatabilityThunkFeature(
504
symbol_versioning.deprecated_in((2, 5, 0)),
505
'bzrlib.tests', name,
506
name, 'bzrlib.tests.features'))
509
for (old_name, new_name) in [
510
('UnicodeFilename', 'UnicodeFilenameFeature'),
512
setattr(tests, name, _CompatabilityThunkFeature(
513
symbol_versioning.deprecated_in((2, 5, 0)),
514
'bzrlib.tests', old_name,
515
new_name, 'bzrlib.tests.features'))