On Fri, Oct 14, 2005 at 11:03:13PM +0200, Wim Oudshoorn wrote:
Not sure what is wrong, but the following monotone command gives me
troubles:
monotone cert 2c4 test-cert-1
It shows on the terminal
monotone: expanded selector '2c4' -> 'i:2c4'
monotone: expanding selection '2c4'
monotone: expanded to '2c4681f8bef0783c5cb0e1be092fc93e58907dd4'
*
With the cursor shown at the * location.
If I press enter I the screen looks like:
monotone: expanded selector '2c4' -> 'i:2c4'
monotone: expanding selection '2c4'
monotone: expanded to '2c4681f8bef0783c5cb0e1be092fc93e58907dd4'
enter passphrase for key ID address@hidden:
monotone: empty passphrase not allowed
enter passphrase for key ID address@hidden:
monotone: empty passphrase not allowed
enter passphrase for key ID address@hidden:
monotone: empty passphrase not allowed
monotone: misuse: no passphrase given
nelly:~/src/em-a woudshoo$
Just looked at this again. It seems to be a small, funky bug in
monotone.
If you pass only 2 arguments to 'cert', it reads stdin to get the
actual contents of the cert. It's not waiting for your password; it's
waiting for stdin to report end-of-file (e.g., by you pressing ^D).
However, I guess using 'cin' to read the contents of stdin is a bit of
a problem, since I think istreams will never become valid to read
after they have reported EOF, but the actual semantics of a tty
are that it _can_ become readable again after reporting EOF? I'm not
quite sure what should be done here; even if we fix the problem so you
can hit ^D and then enter your passphrase, a stdin-slurping interface
that can only be used effectively when stdin is a tty is sort of
pointless...