I sent out a description of how I think light weight "locks" could be
implemented on top of fossil in a past email. In fact I'm making some good
progress on implementing what I want in a wrapper around fossil (implement
locks in addition to some other things). I can look into making the wrapper
available if anyone is interested.

As has been mentioned Locks are really helpful when managing data that can't
be automatically merged. However the need is not for draconian control but
more of a semaphore to prevent accidentally changing a binary file at the
same time someone else does.

A more than adequate lock/semaphore methodology could be implemented on top
of fossil roughly like the following...

files have two flags; lockcontrolled and lockstate

User locks file(s): fossil lock file1 file2 ...
    1. Write permissions are removed
    2. Lockcontrolled flag is set
    3. Lockstate is set.
    4. Sync

On check out
   1. Files locked by others have write perms removed

On commit
   1. Changed locked files cause an error, override with -force

On update
   1. Update write permissions per the flags.
   2. A locally changed locked file causes a merge failure

On unlock for edit
   1. If file not already locked....
   2. Update flags, sync
   3. Open permissions

Or something like that. I think the closely coupled agressive sync model
fostered by fossil makes this very doable.

Matt
-=-

On Wed, Oct 19, 2011 at 7:52 AM, Stephan Beal <sgb...@googlemail.com> wrote:

> On Wed, Oct 19, 2011 at 4:44 PM, Stephan Beal <sgb...@googlemail.com>wrote:
>
>> On Wed, Oct 19, 2011 at 4:17 PM, Remigiusz Modrzejewski <
>> l...@maxnet.org.pl> wrote:
>>
>>>
>>> I seem to be still in the 80's... So how do you cope with edit conflicts
>>> on binary files today?
>>>
>>
>> i wasn't aware that people use them for binary files. i don't ever keep
>> binary files in SCM, so i've never had that use case.
>>
>
> Could a new "special" tag be used to implement lock-like behaviour? By
> "special" i mean a reserved name (or name pattern, e.g. locked-by-USERNAME).
>
> --
> ----- stephan beal
> http://wanderinghorse.net/home/stephan/
>
> _______________________________________________
> fossil-users mailing list
> fossil-users@lists.fossil-scm.org
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
>
>
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to