Is there a check out lock in hg ?

Thomas Arendsen Hein thomas at intevation.de
Fri Dec 15 17:46:28 UTC 2006


* T.J. Yang <tj_yang at hotmail.com> [20061215 12:28]:
> I am  using RCS' "co -l fle" to serve as alert to avoid editing
> same file by different persons at same time. Is there similar
> mechanism in hg ?

No.

The usual way is to create a clone of the repository, edit, and then
push back and (if necessary) merge.


Maybe this can be implemented by an extension which marks files as
read-only on update and provides a 'hg edit' command to create a
user-writable version of the file. On commit or revert the file is
made read-only again.

The other thing that has to be prevented in this case is another
user updating or reverting the working directory, this can be done
in the same extension, too, using hooks.

Anything else that needs to be locked?

Thomas

-- 
Email: thomas at intevation.de
http://intevation.de/~thomas/



More information about the Mercurial mailing list