monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] commit ignores _MTN/options keydir


From: Stephen Leake
Subject: Re: [Monotone-devel] commit ignores _MTN/options keydir
Date: Thu, 06 Mar 2008 07:00:15 -0500
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/22.1 (windows-nt)

Derek Scherger <address@hidden> writes:

> Stephen Leake wrote:
>> Derek Scherger <address@hidden> writes:
>>> I committed a change yesterday that sets a default value for the
>>> --keydir option for non-workspace commands (CMD_NO_WORKSPACE) in rev
>>> 65ac5a3fda02533e30468090f63f82e3674cac73.
>> This also fixes my bug.
>
> Ok, good, that's encouraging.
>
>> I've checked in my new test anyway, to ensure the bug does not come
>> back. I verified it fails with mtn 0.39.
>
> Also good.
>
>>> This prevents hitting another invariant on an empty key directory
>>> (i.e. the keydir name is "") also in the key_store. Unfortunately,
>>> this "fix" also seems to trigger another invariant in
>>> workspace::get_ws_options (work.cc:454) I(opts.key_dir.empty())'
>>> which requires that there is no default keydir.
>> I fixed this by deleting that invariant.
>> There is consequence of these changes; 'mtn sync' now appears to
>> require an explicit --key option. And it is also not respecting keydir
>> in _MTN/options; more work to do :(>
>
> Crap! I'll have a look at some point in the next few days. At the
> moment I'm fiddling on the nuskool branch though.

I'll look at it. 

There are probably other commands that have the same problem. So I
think the right approach is to change the 'mtn' command in
lua-testsuite.lua to _not_ specify --keydir, and also change
'mtn_setup' to specify --keydir for the 'setup' command. Then all the
existing tests will use --keydir in a more normal way, and we don't
have to write new tests for this.

Then there may be other places in other tests that need --keydir, if
they are not executed in the context of a workspace.

That's a big change, so I'll do it on a branch; n.v.m.experiment.no_keydir

I suppose we should go back and write new tests for explicit --keydir
on each command. But unless we have a convincing use case for that, I
think we can ignore it.

Hmm. 'mtn' currently also specifies --confdir, which also sets
opt.keydir if --keydir is not given. So that has to be deleted as
well. --confdir also specifies where 'monotonerc' is, but that's
already given by an explicit --norc --rc <file>. 

grep says the only other use for opts.conf_dir is the "dump" directory
if no workspace is found, and a lua command "get conf dir". So that
should be ok, unless some test is using that lua command. I guess I'll
find out.

-- 
-- Stephe




reply via email to

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