Merge lp:~gz/bzr/win32_mkdtemp_infinite_recursion into lp:bzr

Proposed by Martin Packman on 2010-07-04
Status: Merged
Approved by: John A Meinel on 2010-07-04
Approved revision: 5332
Merged at revision: 5334
Proposed branch: lp:~gz/bzr/win32_mkdtemp_infinite_recursion
Merge into: lp:bzr
Diff against target: 12 lines (+1/-1)
1 file modified
bzrlib/osutils.py (+1/-1)
To merge this branch: bzr merge lp:~gz/bzr/win32_mkdtemp_infinite_recursion
Reviewer Review Type Date Requested Status
John A Meinel 2010-07-04 Approve on 2010-07-04
Review via email: mp+29166@code.launchpad.net

Commit Message

Fix regression from r5326 that caused infinite recursion in osutils._win32_mkdtemp

Description of the Change

Fixes a regression from r5326 caused by removing `tempfile.` from the start of `mkdtemp` inside a function that is then bound as `mkdtemp` on Windows.

Would like to clean up osutils to avoid craziness like this, and am not actually convinced the lazy import of tempfile is ever a win, but just reverting the one line for now.

This was actually caught by babune, but red is both "tests failed" and "test run aborted" so it wasn't obvious:
http://babune.ladeuil.net:24842/job/selftest-windows/107/

To post a comment you must log in.
Robert Collins (lifeless) wrote :

+1

John A Meinel (jameinel) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin [gz] wrote:
> Martin [gz] has proposed merging lp:~gz/bzr/win32_mkdtemp_infinite_recursion into lp:bzr.
>
> Requested reviews:
> bzr-core (bzr-core)
>
>
> Fixes a regression from r5326 caused by removing `tempfile.` from the start of `mkdtemp` inside a function that is then bound as `mkdtemp` on Windows.
>
> Would like to clean up osutils to avoid craziness like this, and am not actually convinced the lazy import of tempfile is ever a win, but just reverting the one line for now.
>
> This was actually caught by babune, but red is both "tests failed" and "test run aborted" so it wasn't obvious:
> http://babune.ladeuil.net:24842/job/selftest-windows/107/
>

 merge: approve

Since the Review queue doesn't actually support "+1" anymore.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkwwmaIACgkQJdeBCYSNAAM1lgCfdB7c8yeRiVbM3YY08dAPrJ+C
8okAnRPncPLgjfJaIFT7tyf93yfX+wox
=H9/O
-----END PGP SIGNATURE-----

review: Approve
Robert Collins (lifeless) wrote :

sent to pqm by email

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bzrlib/osutils.py'
2--- bzrlib/osutils.py 2010-06-29 17:46:25 +0000
3+++ bzrlib/osutils.py 2010-07-04 07:54:28 +0000
4@@ -352,7 +352,7 @@
5
6
7 def _win32_mkdtemp(*args, **kwargs):
8- return _win32_fixdrive(mkdtemp(*args, **kwargs).replace('\\', '/'))
9+ return _win32_fixdrive(tempfile.mkdtemp(*args, **kwargs).replace('\\', '/'))
10
11
12 def _win32_rename(old, new):