monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] --non-interactive: run in non-interactive


From: Zack Weinberg
Subject: Re: [Monotone-devel] --non-interactive: run in non-interactive
Date: Wed, 30 Jan 2008 18:58:23 -0500

2008/1/30 Zbigniew Zagórski <address@hidden>:
>  So i invented --never-prompt-password, and started to hack ;). Later
>  on I've decided that --non-interactive global option will be better.
>
>  When you'll specify this option to mtn it will never ask for a
>  password. If the password is needed (no lua hook, no key in ssh-agent)
>  it will clearly fail with some informative message.
>
>  In current state this option will affect password prompt only, but it
>  can be used in future commands to check if user wants to make decisions.

I approve of the concept in general; however ...

>  After five minutes it appeared that almost all functions from keys.hh
>  must accept app_state& instead of lua_hooks& only:

I have to veto anything that does anything like that, because we're in
the process of removing the app_state structure altogether.  I'm in
the middle of rototilling keys.cc and key_store.cc right now and I
can't guarantee what they will look like when I'm done, but - I expect
that the right thing for you to do is save the option in the key_store
object when that object is constructed, if that makes sense?

Also, I wonder if a --passphrase-fd=NUMBER option would make sense for
your work.  This idea comes from GPG - if the option is given,
monotone would read any passphrase it needs from that file descriptor
rather than the terminal.  You'd make the file descriptor a pipe, and
if monotone tries to read from it, pop up a password-prompt dialog
box.  (I don't actually know how to code that on your end but I'm sure
it's possible.)

zw

reply via email to

[Prev in Thread] Current Thread [Next in Thread]