# # # patch "contrib/extra-commands.lua" # from [5fc6b602f136d33d3e8405e9f80206fa6e0508dc] # to [4ad86255ae43a32fbf1ad67f5328ff78075e322f] # # patch "monotone.texi" # from [a5a0086213962c35f3f83f3fb334713265728652] # to [11dbcb7685ca2369e9131eb7a4c2194f6b5619ae] # ============================================================ --- contrib/extra-commands.lua 5fc6b602f136d33d3e8405e9f80206fa6e0508dc +++ contrib/extra-commands.lua 4ad86255ae43a32fbf1ad67f5328ff78075e322f @@ -17,7 +17,7 @@ function cpp(...) mtn_automate("get_option", "branch") -- make sure we have a valid workspace mtn_automate("commit") mtn_automate("pull") - heads = mtn_automate("heads") + local ok, heads = mtn_automate("heads") words = 0 for word in string.gfind(heads, "[^%s]+") do words=words+1 end if words == 1 then ============================================================ --- monotone.texi a5a0086213962c35f3f83f3fb334713265728652 +++ monotone.texi 11dbcb7685ca2369e9131eb7a4c2194f6b5619ae @@ -9068,12 +9068,13 @@ @section Additional Lua Functions @item mtn_automate( ... ) -The mtn_automate function calls the the monotone automate command passed in -its arguments. The result of the call is a pair of strings, the first -being the output from the automate command, and the second being the text -of any warnings output by the automate command. -This function is not for use in ordinary hooks, but rather for lua based -commands as defined by @code{register_command()}. +The @code{mtn_automate} Lua function calls the Monotone address@hidden command passed in its arguments. The result of the +call is a pair consisting of a boolean return code, indicating whether +the call was successful or not, and a string being the @code{stdout} +output from the @command{automate} command. This function is not for use +in ordinary Lua hooks, but rather for Lua based commands as defined by +the Lua function @code{register_command}. @item parse_basic_io(@var{data})