[PATCH] merge: do not try to delete several times the same directory
Adrian Buehlmann
adrian at cadifra.com
Sun Nov 7 09:30:40 CST 2010
On 07.11.2010 15:41, Dan Villiom Podlaski Christiansen wrote:
> On 7 Nov 2010, at 14:50, Adrian Buehlmann wrote:
>
>> On 07.11.2010 14:18, Nicolas Dumazet wrote:
>>> 2010/11/7 Nicolas Dumazet <nicdumz at gmail.com>:
>>>
>>>> + maybeempty.add(os.path.dirname(fn))
>>>
>>> Not perfect because os.path.dirname can raise OSError(EISDIR).
>>
>> Hmm. You say os.path.dirname can raise OSError(EISDIR).
>
> Perhaps it's os.unlink() that can raise it? Judging from the
> implementations of os.path.dirname() in Python 2.4, Python 2.7 and
> PyPy 1.3, none of them access the filesystem in it, and thus won't
> raise an OSError.
Thanks. So os.path.dirname cannot raise OSError (which was my assumption
about that function as well. It's a simple path string manipulator).
(back to my util.opener patch... :)
More information about the Mercurial-devel
mailing list