Mercurial temporary file nomenclature

Jason Harris jason.f.harris at gmail.com
Wed Apr 14 06:33:21 CDT 2010


On Apr 14, 2010, at 12:29 PM, Benoit Boissinot wrote:

> On Wed, Apr 14, 2010 at 12:22 PM, Jason Harris <jason.f.harris at gmail.com> wrote:
>> 
>> On Apr 14, 2010, at 9:16 AM, Benoit Boissinot wrote:
>> 
>>> On Wed, Apr 14, 2010 at 06:36:19AM +0200, Jason Harris wrote:
>>>> 
>>>> Actually after patching my local mercurial like Benoit wonderfully
>>>> suggested, I removed all my hacks from my GUI program under
>>>> development. But I found another race condition and it was caused by
>>>> the following in util.py:
>>> 
>>> both are now prefixed by 'hg-something'
>>> 
>>> cheers,
>> 
>> Thanks.  But the problem still remains. OSX *only* has capabilities to say when things have changed inside a *directory*, which files have changed in that directory it doesn't report. So when a file event to hg-something-..... at the root directory of the repository goes wizzing by, OSX can only signal that a change has been made to the repository *directory*. Thats all. See... http://developer.apple.com/mac/library/documentation/Darwin/Conceptual/FSEvents_ProgGuide/Introduction/Introduction.html
>> 
>> Thus I need to know if the change was real or not, thus I do a status check of the files at the root of the repository, and the file goes wizzing by again causing OSX to report a change, etc... and we are off to the races... :)
>> 
>> Thus one solution is to put this temporary file somewhere else (inside a sub directory, then I can ignore events in this entire subdirectory...) but I gather from previous responses that this is not acceptable. The other option is to control this by an environment variable so GUI clients (and others) can control this once they do suitable checks.
> 
> The real solution is to port the inotify extension to OSX, the inotify
> extension would only create the temporary files once. (Nicolas: does
> it deal correctly with it on linux?)

I wouldn't object at all to that solution :)  That would be even nicer but it sounds much bigger in scope...

Cheers,
  Jason



More information about the Mercurial mailing list