# # # patch "NEWS" # from [cbf36a204a868833da6bafa649144040461a284e] # to [f3da68f7a26c8b032cef6ef58744ebc660dd9b98] # # patch "cmd_automate.cc" # from [d55a314b338826605bc1afaa59b74aa74ae0240b] # to [e0e235fb482bd7233c962ecfa4754f85af0e2367] # # patch "cmd_merging.cc" # from [1b12d445f9a5798743a7a1ff182ab5f5b1449a12] # to [e30a1fe6db76f8e748cc647100fe580ba5acfe0d] # # patch "monotone.texi" # from [636cf37b232261de8c9231f2a2544876ae0776d4] # to [d9ba9a183c69ad924a6fe5afc35b92ed54899bd9] # ============================================================ --- NEWS cbf36a204a868833da6bafa649144040461a284e +++ NEWS f3da68f7a26c8b032cef6ef58744ebc660dd9b98 @@ -6,6 +6,10 @@ xxx xxx xx xx:xx:xx UTC 2010 New features + - 'automate update' is now supported. + + - There is a new Lua extension function change_workspace. + - There is a server_set_listening(bool) Lua extention function available since 0.47, which can be used to let a monotone server exit gracefully instead of having to be killed. @@ -72,7 +76,7 @@ Sun Mar 14 21:15:06 UTC 2010 - The various occurrences where a revision is described by its certs now come with proper localized date output. - - Fix problems with newer Lua versions especially when + - Fix problems with newer Lua versions especially when LUA_COMPAT_VARARG not set. Other ============================================================ --- cmd_automate.cc d55a314b338826605bc1afaa59b74aa74ae0240b +++ cmd_automate.cc e0e235fb482bd7233c962ecfa4754f85af0e2367 @@ -83,7 +83,7 @@ namespace commands { // This number is only raised once, during the process of releasing a new // version of monotone, by the release manager. For more details, see -// point (2) in notes/release-checklist.txt +// point (4) in notes/release-checklist.txt static string const interface_version = "12.0"; // This number determines the format version of the stdio packet format. @@ -351,7 +351,7 @@ LUAEXT(change_workspace, ) } // go_to_workspace doesn't check that it is a workspace, nor set workspace::found! - if (path_exists(ws / bookkeeping_root_component / ".") ) + if (directory_is_workspace(ws)) { workspace::found = true; lua_pushboolean(LS, true); ============================================================ --- cmd_merging.cc 1b12d445f9a5798743a7a1ff182ab5f5b1449a12 +++ cmd_merging.cc e30a1fe6db76f8e748cc647100fe580ba5acfe0d @@ -175,8 +175,9 @@ pick_branch_for_update(options & opts, d return switched_branch; } -static void update (app_state & app, - args_vector const & args) +static void +update (app_state & app, + args_vector const & args) { database db(app); workspace work(app); ============================================================ --- monotone.texi 636cf37b232261de8c9231f2a2544876ae0776d4 +++ monotone.texi d9ba9a183c69ad924a6fe5afc35b92ed54899bd9 @@ -39,7 +39,7 @@ Copyright @copyright{} 2006 Alex Queiroz @* Copyright @copyright{} 2006, 2007 William Uther @* Copyright @copyright{} 2006 - 2009 Thomas Keller @* -Copyright @copyright{} 2007 - 2009 Stephen Leake @* +Copyright @copyright{} 2007 - 2010 Stephen Leake @* This manual is made available under the GNU GPL version 2.0 or greater. See the accompanying file COPYING for details. @@ -9895,6 +9895,45 @@ @section Automation @end table address@hidden mtn automate update + address@hidden @strong address@hidden Arguments: + +Same as @cmd{mtn update}; no arguments, options address@hidden, @var{--revision=revision} + address@hidden Added in: + +12.1 + address@hidden Purpose: + +Update the current workspace to the latest or given revision; see address@hidden in @ref{Workspace}. + address@hidden Sample output: + +Nothing on stdout. stderr gives progress messages of the form: address@hidden +mtn: updating along branch 'mms.work_stephe' +mtn: selected update target 233afb8c4832bf33d5f5734225164de5f5a6278c +mtn: [left] 4a368a6b217c40b2ff3b12bb7cfa00987e0f191c +mtn: [right] 233afb8c4832bf33d5f5734225164de5f5a6278c +mtn: renaming build/windows_common.make to build/utf_common.make +mtn: adding build/x86_gnu_linux_release address@hidden verbatim + address@hidden Output format: + +Free form, prefixed by ``mtn:''. + address@hidden Error conditions: + +see @cmd{update} in @ref{Workspace}. + address@hidden table + @item mtn automate read_packets @var{packet-data} @table @strong @@ -11258,6 +11297,14 @@ @section Additional Lua Functions This function adds a new alias for a monotone command. A call to this function would normally be placed directly in the @file{monotonerc} file, rather than in a hook function. address@hidden change_workspace(@var{directory}) + +Change to workspace @var{directory}, which may be absolute or +relative to the directory that was current when mtn was started. + +Throws an error if @var{directory} does not exist or is not a +workspace (does not contain @file{_MTN}). + @item existonpath(@var{possible_command}) This function receives a string containing the name of an external