monotone-devel
[Top][All Lists]
Advanced

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

[Monotone-devel] Re: Workspace commands and automate/stdio


From: William Uther
Subject: [Monotone-devel] Re: Workspace commands and automate/stdio
Date: Mon, 9 Jul 2007 17:28:23 -0700


Thomas Keller wrote:

Is there any schedule for adding the workspace commands to
automate/stdio? Having at least the basic commands (add / rename / drop)
available would be really great.

Well, adding those commands to automate is fairly trivial, there are
mostly two problems with it:

a) implementing the commands means code doubling, and that also means
double maintenance

Not necessarily.  I was looking at merging the CMD and CMD_AUTOMATE
macros.  Even command needs to be in automate anyway, right?  There
would be an extra bool that lets you know which you're in, for those
situations where you need to know.  All output would be sent to the
output stream, and that would be connected to stdio when a command
is called normally.

This gets almost to the point where we should just make --automate a global option. We could keep the automate command group for commands that we don't expect normal users to use. Some other commands could probably be moved in there too: "mtn db execute"?

b) there is no agreement yet how the output should look alike in an
error case, especially for stdio

Monotone uses a couple of global macros which error out well- defined if something went wrong and this even works for the stdio ostream. However, what you get as error message is still the same one a normal user would
get. You could start stdio or any other mtn subprocess with LANG=en,
still, if one of those english messages would change (spelling, etc.),
any automate command wouldn't take notice of it and you wouldn't see it
through the interface_version number either.

Hrm.  This is more of an issue...

Is it possible to subvert the translation system with a LANG=MTN_AUTO when we're running a command in automate mode? We could then provide an "automate" translation which could be kept consistent.

I don't know enough about the translation system to know how this would actually work.

This is the problem holding up my nvm.lua_cmds branch at the moment.

Be well,

Will          :-}





reply via email to

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