Specifying file permissions for memfilectx

Ray Ruvinskiy ruvinsk at gmail.com
Sat Sep 11 12:27:24 CDT 2010


My use-case was an attempt at using Mercurial for local version
control of a Perforce repository within the local directory specified
in the Perforce client (i.e., somewhat different from the approach
taken by the Perfarce extension). Perforce is a big fan of read-only
files.

Oh well. If read-only files are not supported, then it can't be helped.

Ray

On Sat, Sep 11, 2010 at 12:12 PM, Augie Fackler <durin42 at gmail.com> wrote:
>
> On Sep 11, 2010, at 11:10 AM, Ray Ruvinskiy wrote:
>
>> So it is impossible to create a read-only file with memfilectx? How
>> are permissions preserved for normal files, then?
>
> Mercurial doesn't store the read or write bit internally - all files get checked out as 0644 or 0755.
>
> What's your use case for wanting a file to be checked out as readonly?
>
>> Ray
>>
>> On Sat, Sep 11, 2010 at 11:53 AM, Augie Fackler <durin42 at gmail.com> wrote:
>>>
>>> On Sep 11, 2010, at 9:26 AM, Ray Ruvinskiy wrote:
>>>
>>>> Hello,
>>>>
>>>> Is there a way to specify permissions for files created with
>>>> memfilectx? What within Mercurial keeps track of the permissions?
>>>
>>> The only permission Mercurial tracks is the executable flag, which is set by passing 'x' as the flags argument to a memfilectx in the filectxfn callback.
>>>
>>>> Thanks,
>>>>
>>>> Ray
>>>> _______________________________________________
>>>> Mercurial-devel mailing list
>>>> Mercurial-devel at selenic.com
>>>> http://selenic.com/mailman/listinfo/mercurial-devel
>>>
>>>
>
>


More information about the Mercurial-devel mailing list