[PATCH] update: fix edge-case with update.atomic-file and read-only files

Martin von Zweigbergk martinvonz at google.com
Sun Jan 13 12:12:06 EST 2019


On Sun, Jan 13, 2019, 01:26 Boris FELD <boris.feld at octobus.net wrote:

> Thank you for the thorough review
> On 11/01/2019 18:24, Martin von Zweigbergk via Mercurial-devel wrote:
>
>
>
> On Fri, Jan 11, 2019 at 7:26 AM Boris Feld <boris.feld at octobus.net>
> wrote:
>
> +
>> +  $ find * -printf "%f:%p:%m\n"
>> +  a1:a1:644
>> +  a2:a2:755
>> +  b1:b1:644
>> +  b2:b2:755
>> +  d:d:644
>> +  ro:ro:644
>> +
>> +Manually reset the mode of the read-only file
>>
>
> Can we also have a test case where a read-only file is committed (so
> updating to it should create it in read-only mode)?
>
> I tried modifying the test case to commit `ro` in read-only for changeset
> #2 but it didn't changed a things. I think that Mercurial is only tracking
> the exec bit on files. I'm not surprised that the files ends up writable
> after an update (with or without atomic temp option).
>
> Do you think it's a bug?
>
No, just not supported. I should have known that. Sorry to make you waste
time trying that.

Perhaps we should add a test for updating a read-only file when *not* using
atomic-temp. I assume we don't since nothing failed when you ran with
--extra-config-opt. I don't even know how it behaves.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20190113/b92e6355/attachment.html>


More information about the Mercurial-devel mailing list