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

James Bruce bruce at andrew.cmu.edu
Tue Nov 23 06:31:47 UTC 2004


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.

Also there's this rule:
 > Rule number one of working with darcs: never do anything interesting
 > when "darcs what" doesn't say ``no changes''.

Why not just have those commands say "you have local changes, commit 
them, or if you really know what you are doing, rerun with --force". 
Around my lab we end up teaching undergrads how to use SCMs since they 
rarely seem to learn about them in classes.  Making a bit harder to 
shoot yourself in the foot is in general a good thing.  Having --force 
means the experienced user can do what they want, although its often 
nice to have a program remind you if you might be about to do something 
stupid.  If --force is to much, it could ask you interactively (it's 
happy to ask lots of questions now already, adding one more shouldn't hurt).

It these are off base or uninformed, feel free to ignore me.  Thanks for 
making a free SCM that doesn't suck :)

Jim Bruce





More information about the darcs-users mailing list