instant team mailing list archive
-
instant team
-
Mailing list archive
-
Message #00175
Re: [HG instant] Fix for not using cache, ffc should be fine.
On my system, instant currently creates the directory:
/tmp/instant
If I run two processes at the same time, or if I and Kent run stuff
at a server at the same time, this may lead to corrupt data.
Compared to this:
In [5]: tempfile.mkdtemp("instant")
Out[5]: '/tmp/tmpOFJwuTinstant'
In [6]: tempfile.mkdtemp("instant")
Out[6]: '/tmp/tmpk9f4xjinstant'
In [7]: tempfile.mkdtemp("instant")
Out[7]: '/tmp/tmpQ63f-Tinstant'
which gives a unique name each time.
--
Martin
2008/9/1 Ilmar Wilbers <ilmarw@xxxxxxxxx>:
> What's wrong with tempfile.gettempdir()? I'm sure that mkdtemp is a better
> idea, I am just not sure why?
>
> ilmar
>
> Martin Sandve Alnæs wrote:
>>
>> Suggestion: Use 'd = tempfile.mkdtemp("instant")' to create temporary
>> directory.
>> This way multiple processes and multiple users can't mess up things.
>>
>>
>
Follow ups
References
-
[HG instant] Fix for not using cache, ffc should be fine.
From: Instant, 2008-08-12
-
Re: [HG instant] Fix for not using cache, ffc should be fine.
From: Martin Sandve Alnæs, 2008-08-12
-
Re: [HG instant] Fix for not using cache, ffc should be fine.
From: Ilmar Wilbers, 2008-08-28
-
Re: [HG instant] Fix for not using cache, ffc should be fine.
From: Martin Sandve Alnæs, 2008-09-01
-
Re: [HG instant] Fix for not using cache, ffc should be fine.
From: Ilmar Wilbers, 2008-09-01