Can hglock set file permisions?

Martin Geisler mg at
Thu Jun 16 09:46:01 CDT 2011

Friedrich Hagedorn <friedrich_h at> writes:

Hi Friedrich,

> Im playing around with the new hglock extension
> ( and was wondering that
> no file permissions where set for locked files. So I can
> edit locked files but can not commit these locked files. I
> think it would be better if I even can not modifed locked
> files because of their readonly file permissions.
> Is it possible to implement this?

It would be possible and I know that some version control systems work
like this: all files are read-only by default and you must then
explicitly "checkout" a file before makign modifications to it. The
system makes the file read-write to indicate this.

The lock extension is sponsored work and I did actually suggest exactly
this feature to my client. They felt that they did not need the feature
right away, but were otherwise positive.

If you want to have this feature, then you're welcome to give it a try
yourself -- or you can pay me to implement it.

Martin Geisler

aragost Trifork
Professional Mercurial support

More information about the Mercurial mailing list