[Top][All Lists]

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

Re: [Monotone-devel] automate show_conflict

From: Stephen Leake
Subject: Re: [Monotone-devel] automate show_conflict
Date: Sun, 20 Apr 2008 08:44:18 -0400
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/22.1 (windows-nt)

Stephen Leake <address@hidden> writes:

>> If we do the first, it would fix automate heads as well. I'd then
>> second to extend the CMD_AUTOMATE macro then to be able to set
>> use_workspace_options explicitely and do the same like what has been
>> done in in, just before the call
>> to exec_from_automate. 
> I think this is the right approach; it will be most consistent between
> automate and non-automate commands. 
> After sleeping on this, I was going to suggest that we have the code
> in copy the ws options into the new opts object. But
> your point about needing to re-read them makes sense.
> I also think we should do this on this branch. Since we're messing
> with an important macro, we want to get more testing before pushing to
> mainline.

I've started this; I set use_ws_opts false if the automate command
does not obviously use the ws. I didn't check in anything.

However, several tests are now failing:

 97 b_and_h_selectors                             FAIL (line 17)
 98 b_t_and_a_selector_globbing                   FAIL (line 25)
110 check_later_and_earlier_selectors             FAIL (line 29)
191 escaped_selectors                             FAIL (line 17)
193 exchanging_work_via_netsync,_with_notes       FAIL (line 44)
301 multiple_message_commit                       FAIL (line 6)
330 p_selector                                    FAIL (line 14)
410 signature_round_trip                          FAIL (line 13)
422 suspend                                       FAIL (line 14)

because no database is specified for an automate command. It seems
this construct:

    database db(app);

relies on app.opts.dbname having been set, either by a --db option, or
by get_ws_options. And the tests that are failing don't pass a --db

So I think we need to set use_ws_opts true for any automate command
that needs a database. Which is all of them, I believe. Which means
there is no need to change the CMD_AUTOMATE macro.

When run via au stdio, the db object is not reset, so this effect does
not matter.

But we should still re-read the ws opts for each automate command run
via stdio, to be consistent with not running via stdio. We should also
verify that the dbname has not changed, I suppose.

I found three other automate commands that clearly depend on ws
options other than the database: keys, get_option, cert. I'll add
stdio tests for those.

-- Stephe

reply via email to

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