[Top][All Lists]

[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: Fri, 07 Mar 2008 04:44:51 -0500
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/22.1 (windows-nt)

"Zack Weinberg" <address@hidden> writes:

> On Thu, Mar 6, 2008 at 7:00 AM, Stephen Leake
> <address@hidden> wrote:
>>  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.
> Just want to raise a couple of metaconcerns there -
> 1) In the test suite, even if there is no workspace, the "dump" file
> needs to go in the per-test directory, not the user's .monotone
> directory.

Yes. So for tests with no workspace, we need to specify --confdir .
That will require careful review of each test. Hmm. I could run once
with -d, and check for the existence of tester.log; that would be
easier :).

Or 'mtn' can check for the presence of a workspace, and specify
--confdir if it's not found. 

> 2) If we ever add something else that goes in the user's .monotone
> directory, we need a way of being sure that the test suite doesn't
> look at it.  (Is a --no-user-config option a sane thing to talk
> about?)

--no-user-config sounds good for the tests, but I don't think there's
a way to distinguish between "user" and "confdir", and we need
"confdir" for the tests. So we just need to be sure to specify confdir
appropriately for each test.

I think the right thing to do is store confdir in _MTN/options, either
instead of or in addition to keydir.

The default get_netsync_read_permitted hook uses get_confdir to find
read_permissions; similarly for write_permissions.

confdir should be associated with a database, not just a user.
Consider the case where I'm working on two projects, both using
monotone (I can dream, can't I :), and they require significantly
different code in monotonerc, and different lists in read_permissions
and write_permissions. Currently monotonerc doesn't have a "db"
parameter, and neither does get_netsync_read_permitted. That could be
added, but it would be simpler to store confdir in _MTN/options.

> 2a) I think there may currently be circumstances (e.g. on Windows)
> where we use the user's ssh-agent when we shouldn't.  Can you patch
> --ssh-sign=no into the options list while you're at it please?


-- Stephe

reply via email to

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