[darcs-devel] Re: [darcs-users] Re: Suggestion: track patch origin metadata (patch)

Tomasz Zielonka t.zielonka at students.mimuw.edu.pl
Sat Oct 23 16:24:00 PDT 2004


On Sat, Oct 23, 2004 at 12:45:02PM -0400, David Roundy wrote:
> > I think there should be a dual --enable option or something to be able
> > to manually override defaults, but let's see if this will be accepted
> > into darcs at all.
> 
> I'm not so sure.  I like the idea that --disable can be trusted to actually
> disable the command.  So, for example, if you could keep a user from
> modifying _darcs/prefs/defaults, you could disable commands you don't want
> to allow and then use sudo to let him run darcs, and not worry about him
> using --enable to override your policy.

On the other hand, you may want to restrict yourself but also want to be
able to bypass the restrictions occasionally. I am not sure that
modifying defaults every time is a good solution here.

> Perhaps we could add another overrideable option... I envision something
> like --deprecate (only that's a bad name...).  I imagine an option that
> would cause darcs to print out a warning and prompt if you really want to
> go through with it.

Hmmm... maybe soft-disable, disallow, protest, complain, boycott ...?

> Another idea is that we could add a string option to the disable flag,
> which would be a message to be printed out.  So then defaults would read:
> 
> unpull disable David doesn't allow unpulling because it's bad!

With string argument, the option could even be named 'fail'.

> > Also, I am not sure it should be listed in --help, because it is not
> > particularly useful outside of _darcs/prefs/defaults.
> 
> Agreed.  Definitely doesn't belong in --help... although I'm not sure I
> like the precedent of accepting flags that aren't listed in --help.  I hope
> you appreciate my decisiveness... :)

:)

I am happy to remove it from --help. The code for adding disable to
options list looks ugly now.

> > Moreover, it is probably not useful in commands that can be used outside
> > of a repository, like get, etc.
> 
> Well, if could be stuck in ~/.darcs/defaults, although I'm not sure why
> you'd ever want to disable initialize...

Ah, yes, I forgot about ~/.darcs. Anyway, I think it's better to allow
disabling of any command - this will keep the code simple and can't see
any real disadvantages.

> > Every {\tt COMMAND} accepts the \verb!--disable! option, which can be
> > used in \verb!_darcs/prefs/defaults! to disable some commands in the
> > repository. This can be helpful if you want to protect the repository
> > from accidential use of advanced commands like unpull, unrecord or
> > rerecord.
> 
> This documentation is nice, as far as it goes, but I think it would a good
> idea to also add a paragraph in configuring_darcs.tex, since that's where
> people will be looking when they want to find out how to set up their
> repositories.

OK, I'll see if I can write something that fits there.

Treat the patch I sent you as a proposal and don't include it in darcs.
I will make a new patch "from scratch". Or is it against darcs'
philosophy? It could cause conflicts if someone decided to try my patch
before it is accepted into official darcs...

Best regards,
Tom

-- 
.signature: Too many levels of symbolic links




More information about the darcs-devel mailing list