[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] update multiple projects
From: |
Thomas Keller |
Subject: |
Re: [Monotone-devel] update multiple projects |
Date: |
Tue, 30 Mar 2010 19:33:27 +0200 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; de; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 |
Am 28.03.10 18:17, schrieb Stephen Leake:
> Stephen Leake <address@hidden> writes:
>
>> function gds_update_all()
>> local workspaces = gds_find_workspaces (gds_missions)
>>
>> for _, ws in pairs(workspaces) do
>> -- cd("../" .. ws)
>> -- mtn ("update")
>> mtn_automate ("update", "--workspace=" .. ws)
>> io.stderr:write(ws .. "\n")
>> end
>> end
>
> I've started working on this. 'mtn automate update' is implemented;
> see cmd_merging.cc in 2cc8eafc9f3350379e72c47c24e567ffc52d7fbc in
> branch nvm.stephe. There's a test for it. It was easy, since there is
> no output to format (it's progress, not useful for parsing).
>
> I added a new Lua function 'change_workspace' (cmd_automate.cc in
> f0b5f85a97853d52f94fd3aab2606ba093a40bff), which basically calls
> paths.cc go_to_workspace.
> [...]
> Any comments on 'automate update' or 'change_workspace'?
Looks good in general, a few open points though:
1) How does automate update behaves (especially over stdio) when a
workspace merge has to take place? I don't see any special code handling
that in a sane way.
2) From what I see change_workspace() might potentially open a can of
worms / bugs, especially on long-running stdio instances where an
existing database connection is kept open. One could f.e. think a call
like `automate lua change_workspace /path/to/new/workspace` is harmless,
while everything might explode (tm) afterwards because the workspace
points to an entirely different database...
3) It would be cool if you could test the options for automate update a
bit more and harden the test when it looks for the right progress
message (progress[9] might break at any time in the future when somebody
decides to add another test file, while it possibly should not do so).
4) What do you mean with
+ // need a variant of P that doesn't require F?
+ P(F(f.what()));
?
5) Minor nitpicks:
+ E(args.empty(), origin::user,
+ F("update takes no command arguments"));
We usually use one single message - "wrong argument count" - for this.
+ update (app, args);
There is an additional unneeded space after update.
Thomas.
--
GPG-Key 0x160D1092 | address@hidden | http://thomaskeller.biz
Please note that according to the EU law on data retention, information
on every electronic information exchange might be retained for a period
of six months or longer: http://www.vorratsdatenspeicherung.de/?lang=en
signature.asc
Description: OpenPGP digital signature
- [Monotone-devel] update multiple projects, Stephen Leake, 2010/03/11
- Re: [Monotone-devel] update multiple projects, Stephen Leake, 2010/03/28
- Re: [Monotone-devel] update multiple projects, Stephen Leake, 2010/03/29
- Re: [Monotone-devel] update multiple projects,
Thomas Keller <=
- Re: [Monotone-devel] update multiple projects, Stephen Leake, 2010/03/30
- Re: [Monotone-devel] update multiple projects, Thomas Keller, 2010/03/30
- Re: [Monotone-devel] update multiple projects, Stephen Leake, 2010/03/31
- Re: [Monotone-devel] update multiple projects, Thomas Keller, 2010/03/31
- Re: [Monotone-devel] update multiple projects, Stephen Leake, 2010/03/31