[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] update multiple projects
From: |
Stephen Leake |
Subject: |
Re: [Monotone-devel] update multiple projects |
Date: |
Sun, 28 Mar 2010 12:17:30 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (windows-nt) |
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.
My Lua function now looks like this (the rest is unchanged from the
previous post):
function gds_update_all()
local workspaces = gds_find_workspaces (gds_missions)
local status, output
if 0 == # workspaces then
error("no GDS workspaces found")
end
for _, ws in pairs(workspaces) do
change_workspace(ws)
io.stderr:write(ws)
status, output = mtn_automate("update")
-- output is stdout; stderr is output already.
if status ~= 0 then
io.stderr:write(" failed\n")
else
io.stderr:write("n")
end
end
end
This basically works, but I'm getting errors about writing the options file:
mtn: warning: Failed to write options file _MTN/options: error: renaming
'_MTN/mtdkyfvx.tmp' to '_MTN/options' failed: Access is denied. (5)
This is comming from the workspace constructor in update.
The actual update succeeds, but the temp options file is left.
It appears that something has the options file locked, but I can't
figure out what. Any hints?
Any comments on 'automate update' or 'change_workspace'?
--
-- Stephe
- [Monotone-devel] update multiple projects, Stephen Leake, 2010/03/11
- Re: [Monotone-devel] update multiple projects,
Stephen Leake <=
- Re: [Monotone-devel] update multiple projects, Stephen Leake, 2010/03/29
- Re: [Monotone-devel] update multiple projects, Thomas Keller, 2010/03/30
- 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