[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Monotone-devel] Updated Issue 132 - mtn_automate() does not allow the e
From: |
code |
Subject: |
[Monotone-devel] Updated Issue 132 - mtn_automate() does not allow the execution of the `remote' command (monotone) |
Date: |
Mon, 17 Jan 2011 20:15:43 GMT |
Hello,
The following issue has been updated:
132 - mtn_automate() does not allow the execution of the `remote' command
Project: monotone
Status: Accepted
Reported by: Thomas Keller
URL: https://code.monotone.ca/p/monotone/issues/132/
Labels:
Type:Incorrect Behavior
Priority:Medium
Comments (last first):
# By Thomas Keller, Jan 17, 2011:
I obviously forgot the "remote_stdio in remote_stdio" pair which should also be
prevented.
I also tested out remote in remote_stdio and this worked just well. remote in
stdio worked as well, but leaves some out-of-band gunk that breaks stdio. I'll
try to fix that and afterwards enable remote in stdio and remote_stdio (and of
course I'll write test for that so it does not break again).
Status: Accepted
Owner: tommyd
# By Thomas Keller, Jan 12, 2011:
Steps to reproduce the problem:
-------------------------------
Write a small hook / user command which calls mtn_automate("remote",
"--remote-stdio-host=mtn://code.monotone.ca/monotone", "branches")
Expected result:
----------------
See the list of branches from the remote monotone server.
Actual results:
---------------
automate.cc:2448: detected network error, 'E(acmd->can_run_from_stdio())'
violated
Output of `mtn version --full`:
-------------------------------
0.99.1 and probably earlier. This was likely introduced when the stdio setup
code was refactored. A quick fix might be to add a setter for stdio_ok in
cmd_automate.cc (set_can_run_from_stdio) and call this setter later in the same
file in LUAEXT(mtn_automate) conditionally when the command "remote" should be
executed.
Maybe it would also be a good idea to rethink the stdio_ok flag, i.e. why
shouldn't it be allowed to call "remote" also via stdio? Things we'd like to
block because of otherwise mixed up communication streams are
* calling stdio in remote_stdio
* calling stdio in stdio
* calling remote_stdio in stdio
* calling remote inside remote_stdio (never tried that, it could
_theoretically_ work, but it also might break horribly)
So the first four items are blocked nicely with the existing stdio_ok, maybe we
should just find out whether it would hurt us a lot to switch
CMD_AUTOMATE_NO_STDIO(remote) to CMD_AUTOMATE(remote).
--
Issue: https://code.monotone.ca/p/monotone/issues/132/