[darcs-users] Re: Small suggestion: lock/unlock and minor idiot-proofing

Mark Stosberg mark at summersault.com
Tue Nov 23 17:39:40 UTC 2004


On 2004-11-23, James Bruce <bruce at andrew.cmu.edu> wrote:
> Sorry if this has been brought up before, as I'm a relative newcomer to 
> darcs (from your LKML announcement actually).  I have some possible 
> suggestions about the UI.
>
> since "darcs unrecord" is dangerous for possibly public changes, how 
> about adding a "darcs lock" command that makes a lockfile, so that you 
> can't pull from that repository (or maybe requiring --force to be 
> specified).  Then you don't need to worry about record/unrecord/rerecord 
> while it is locked.  When you are done, just "darcs unlock" and people 
> can start pulling from you.  It also should not allow "darcs push" so 
> newbies like me don't accidentally share something.  This seems quite 
> easy to implement by simply creating a _darcs/lock file, and having 
> pulls etc check for that file first.

I like the spirit of this suggestion.

There is also a similiar idea on the table, which is to support:

darcs init --public
and 
darcs init --private

Flags like this would permanently disable some commands on the repo.
For example, you may never want people to pull from your private repo.

I believe there is already some infrastructure for both your suggestion
and this on in the form a "--disable" flag that is already present for
all commands.

So, it should be fairly trivial to write a an external "darcs_lock"
script, for those who like your idea (in the even it's not integrated).

    Mark





More information about the darcs-users mailing list