~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/osutils.py

  • Committer: Vincent Ladeuil
  • Date: 2008-08-26 08:25:27 UTC
  • mto: (3668.1.1 trunk) (3703.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 3669.
  • Revision ID: v.ladeuil+lp@free.fr-20080826082527-109yyxzc0u24oeel
Fix all calls to tempfile.mkdtemp to osutils.mkdtemp.

* bzrlib/transform.py:
(TransformPreview.__init__): Use osutils.mkdtemp instead of
tempfile.mkdtemp.

* bzrlib/tests/test_whitebox.py:
(MoreTests.test_relpath): Use osutils.mkdtemp instead of
tempfile.mkdtemp.

* bzrlib/tests/test_setup.py:
(TestSetup.test_build_and_install): Use osutils.mkdtemp instead of
tempfile.mkdtemp.

* bzrlib/tests/test_bundle.py:
(BundleTester.get_checkout): Use osutils.mkdtemp instead of
tempfile.mkdtemp.

* bzrlib/tests/blackbox/test_outside_wt.py:
(TestOutsideWT.test_cwd_log,
TestOutsideWT.test_diff_outside_tree): Use osutils.mkdtemp instead
of tempfile.mkdtemp.

* bzrlib/smart/repository.py:
(SmartServerRepositoryTarball._copy_to_tempdir): Use
osutils.mkdtemp instead of tempfile.mkdtemp.
(SmartServerRepositoryTarball._tarfile_response): Line too long.

* bzrlib/remote.py:
(RemoteRepository._copy_repository_tarball): Use osutils.mkdtemp
instead of tempfile.mkdtemp.

* bzrlib/osutils.py:
(_mac_mkdtemp): Add docstring.

* bzrlib/mail_client.py:
(ExternalMailClient.compose): Use osutils.mkdtemp instead of
tempfile.mkdtemp.

* bzrlib/diff.py:
(DiffFromTool.__init__): Use osutils.mkdtemp instead of
tempfile.mkdtemp.

Show diffs side-by-side

added added

removed removed

Lines of Context:
364
364
 
365
365
 
366
366
def _mac_mkdtemp(*args, **kwargs):
 
367
    """Override default mkdtemp to set write group.
 
368
 
 
369
    OSX set the group to 'wheel', we want the group to be the user's one
 
370
    instead, so that we can set the group sticky bit if needed."""
367
371
    tmp_dir = tempfile.mkdtemp(*args, **kwargs)
368
372
    os.chown(tmp_dir, os.getuid(), os.getgid())
369
373
    return tmp_dir
370
 
   
371
 
    
 
374
 
 
375
 
372
376
# Default is to just use the python builtins, but these can be rebound on
373
377
# particular platforms.
374
378
abspath = _posix_abspath