# # # patch "INSTALL" # from [e0f783d8e7b4ba600407c7d1f22493408195a506] # to [4ba6492c71bd99721aff0612f1650ad0f70338f5] # # patch "NEWS" # from [c4ab613de1b6087a6f5a1d790feb7428416c4fa4] # to [084a0f5b81e7becea90378b0e46eaf58312894f9] # # patch "UPGRADE" # from [e535a17a2f948fd7ddee92916cf064439bc88584] # to [d58d62aebea44b98f7fa9dd48abe93da41526d52] # # patch "docs/Additional-Lua-Functions.html" # from [a20e1a6abc7f30e909076b1f295832bb768f0ab2] # to [14741bc4e27941a28822d5dcf446691c2c7afd63] # # patch "docs/Automation.html" # from [f29c90fe440fea9f22ce4df65e66d34585a30014] # to [9b44489b7ad04ddccdcf82ac6d5a75d6e0d46447] # # patch "docs/CVS-Phrasebook.html" # from [74d9762c96bb7e130c3b086205599ecbc668c36a] # to [e790524d54a2332bbf14e04fed7676ba6df56147] # # patch "docs/Certificate.html" # from [f5f761765039f3768e6299088025b22124e7f795] # to [c5e3af1fe0b79b52af89a16404c5f0351ef56fda] # # patch "docs/Database.html" # from [ba54f8344b2ab01c070261b7f1d4bccba1ad8cdb] # to [143826efd443bd9e9a0d3b4c19700e4a560e4e10] # # patch "docs/Default-hooks.html" # from [ae06201ff21759eea0f55b98ae0642245c1e32c8] # to [dc8bd4e2e64324049f8c975985d5d62893abcb9b] # # patch "docs/Generating-Keys.html" # from [139a29b4bfd984210460a44f080db9933af82b10] # to [f97c0998cf7d223ef4e2271f40b37b838a254bda] # # patch "docs/Hooks.html" # from [e26a3fd83f21be45c05d68e3eba3b33e14bf599e] # to [dee4937805e874bfab1e2e43afd261d2e044d7a9] # # patch "docs/Index.html" # from [a2a84699df933b40ff4c3472b6e52b378376b776] # to [cbf954e9e01c95e85abc8745f5e21ebe4a4dd262] # # patch "docs/Informative.html" # from [a7a6c4c58de1d313ecf3dd8915b4de276ce1c2d6] # to [468bbecb358334b5ff81068ae5c000756c8ad89e] # # patch "docs/Key-and-Cert-Trust.html" # from [7d8a7af23907cbe0482443b324bec1537d12be78] # to [4e03afc439a3c78f282345064f1491799a309e57] # # patch "docs/Network.html" # from [e36efb76b4ebb2d90f47c846b8b21cd24ac6d75d] # to [ea1beb7ca4c48d2ccae750e1a01baa1143785849] # # patch "docs/Packet-I_002fO.html" # from [235f0e3fa6b640516a179d0bbb52aa0372a6b113] # to [7d822161a943e69f8067fc45e30602f382ee4f2d] # # patch "docs/RCS.html" # from [9517dadad84adae40f160e0c4731ffb2096794b4] # to [518c65ee9e2622156fcd068e1d44514bb09ac41d] # # patch "docs/Reserved-Certs.html" # from [9ef20b2c71a46c8555dc24861a2832695a52c012] # to [7b2a14f984ee84b8740915b9480b72c750758579] # # patch "docs/Restrictions.html" # from [e7e3fdd0b519d88bbf47a1c5ff994af4b58a755c] # to [452d413cdd9ca3b1fb4c7351d42a92e41a2588c4] # # patch "docs/Tree.html" # from [d5ba1f479bac24dab886da9e837baf5d3b02a44d] # to [b557ca7b886640909179345fba5187d52d49b94f] # # patch "docs/Workspace.html" # from [e99335ca826ea34a52d72e32467e0152a7c4767c] # to [ebe5af40895414d95ec558500a321add67c6a97e] # # patch "monotone.html" # from [4b704e17b4d31d163d258b64ac7285228a1fcc61] # to [4e9e012e2b104ab7dfdfd0a5139b569dab279721] # # patch "monotone.pdf" # from [1ecbdaaa6563c2ccc3db8fcc9d3360f8e199e682] # to [def7bb688c13cfe27b72a877c3fb6e79a5dbddcd] # ============================================================ --- INSTALL e0f783d8e7b4ba600407c7d1f22493408195a506 +++ INSTALL 4ba6492c71bd99721aff0612f1650ad0f70338f5 @@ -13,12 +13,11 @@ 1. prerequisites: * software prerequisites: - a supported C++ compiler: g++ 3.2 or later. - - an installed copy of boost 1.33.0 or later. + - an installed copy of boost 1.32.0 or later. - zlib 1.1.4 or later. on debian: - apt-get install libboost-date-time-dev apt-get install libboost-filesystem-dev apt-get install libboost-regex-dev apt-get install libboost-test-dev ============================================================ --- NEWS c4ab613de1b6087a6f5a1d790feb7428416c4fa4 +++ NEWS 084a0f5b81e7becea90378b0e46eaf58312894f9 @@ -1,10 +1,108 @@ +Sun Apr 1 08:23:34 UTC 2007 + + 0.34 release. + + The internal data format has changed with this release; + migration is straight-forward. To upgrade your databases, + you must run: + $ mtn -d mydb.mtn db migrate + All of these operations are completely lossless, and 0.34 + remains compatible with earlier versions all the way back + to 0.26 with regards to netsync. + + Changes + + - Text is now output at best of the environment's possibilities, + transliterating them or substituting '?' as needed. + + - The lua hook get_author() now takes a second argument, a + key identity, in case someone wants to create an author based + on that and not only the branch name. + + - The command 'chkeypass' became 'passphrase'. + + - The commands 'drop', 'rename' and 'pivot_root' default to + always perform the operation in the file system as well. + They do not accept '--execute' any more, but will instead + take '--bookkeep-only' in case the user only wants to affect + bookkeeping files. + + New features + + - New hook note_mtn_startup(), which is called when monotone is + started. + + - New Lua support function spawn_pipe(), which is used to run + a command and get back its standard input and standard output + file handles as well as the pid. + + - Monotone will automatically add a monotone key in a resident + ssh-agent when it's first used, and will then use ssh-agent + for all subsequent signing. Thus, you will only need to give + the password once in one session. + - New command 'ssh_agent_export' to export a monotone key into + an SSH key. + - New command 'ssh_agent_add' to add a monotone key explicitly + to a resident ssh-agent. + + - New command 'clone' that combines 'pull' and 'checkout'. + + - 'automate put_file' and 'automate put_revision' stores a file + and a revision in the database. + + - 'automate cert', an automate version of 'mtn cert'. + - 'automate db_set', an automate version of 'mtn set'. + - 'automate db_get', an automate version of 'mtn ls vars' with + a twist. + + Other + + - contrib/ciabot_monotone_hookversion.py now uses a real + basic_io parser and thus should send more precise + information to the cia server. Furthermore, it has become + more careful with creating zombies. + + - contrib/monotone-log-of-pulled-revs-hook.lua, a lua hook + to display information about incoming revisions. + + - contrib/monotone-mirror-postaction-push.sh, a post action + script that should be executed by contrib/monotone-mirror.sh + to automatically push data on to other servers. + + - contrib/monotone-mirror.lua, a lua hook that executes + contrib/monotone-mirror.sh after any netsync session is done. + + - contrib/monotone-mirror.sh now takes keydir and keyid + configuration and has better protection against overlapping + duplicate runs. + + - contrib/monotone.bash_completion now handles signals. + + - contrib/monotone.el now includes a commit button. + + Internal + + - Date and time display has now been reimplemented internally + to avoid Boost more. This means that we have lowered our + dependency from Boost 1.33.0 to 1.32.0. + + - Lots of code cleanup. + + - The heights cache got an index, making the processing faster. + + - Update the internal SQLite to version 3.3.13. + + - Algorithm to find uncommon ancestors has been rewritten, so + 'pull' and 'regenerate_caches' should be faster. + + Wed Feb 28 22:02:43 UTC 2007 0.33 release. The internal data format has changed with this release; migration is straight-forward. To upgrade your databases, - you must run: + you must run: $ mtn -d mydb.mtn db migrate All of these operations are completely lossless, and 0.33 remains compatible with earlier versions with regards to @@ -28,158 +126,158 @@ Wed Feb 28 22:02:43 UTC 2007 file type attributes) is planned and will be added in a future release. - - update will switch to the branch of a given revision if it - differs from the current workspace branch. + - update will switch to the branch of a given revision if it + differs from the current workspace branch. - - add will now accept combinations of --unknown, --recursive and - --no-respect-ignore. + - add will now accept combinations of --unknown, --recursive and + --no-respect-ignore. - - import now imports unknown directory trees properly. + - import now imports unknown directory trees properly. - - use SQLite 3.3.12. + - use SQLite 3.3.12. - - schema migrator rebuilt and will now properly detect and report - if the database used is created by a newer monotone than the one - currently used. + - schema migrator rebuilt and will now properly detect and report + if the database used is created by a newer monotone than the one + currently used. - - removed the man page mtn.1, as it hadn't been updated for a long - time. + - removed the man page mtn.1, as it hadn't been updated for a long + time. - New features + New features - - "mtn merge_into_workspace" (still to be documented). This command - will allow you to review and fix up a merge in your workspace - before committing it to the repository. However, the conflict - resolution interface remains the same as that of the 'merge' - command for now (i.e. monotone will invoke your specified merge - tool on all files with conflicts and you must resolve them as they - are presented). Work on in-workspace conflict presentation and - resolution is planned for the future. + - "mtn merge_into_workspace" (still to be documented). This command + will allow you to review and fix up a merge in your workspace + before committing it to the repository. However, the conflict + resolution interface remains the same as that of the 'merge' + command for now (i.e. monotone will invoke your specified merge + tool on all files with conflicts and you must resolve them as they + are presented). Work on in-workspace conflict presentation and + resolution is planned for the future. - - "mtn log" will now print an ASCII revision graph alongside the - usual log text. + - "mtn log" will now print an ASCII revision graph alongside the + usual log text. - Speed improvements + Speed improvements - - "mtn annotate file" should run even faster now. it exploits - the fact that we store deltas of rosters. by peeking at - these deltas, it can avoid reconstruction of whole rosters - in many cases. + - "mtn annotate file" should run even faster now. it exploits + the fact that we store deltas of rosters. by peeking at + these deltas, it can avoid reconstruction of whole rosters + in many cases. - Other + Other - - contrib/monotone-mirror.sh and - contrib/monotone-mirror-postaction-update.sh, two scripts - to mirror and update directories automatically. + - contrib/monotone-mirror.sh and + contrib/monotone-mirror-postaction-update.sh, two scripts + to mirror and update directories automatically. - - contrib/monotone-run-script-post-netsync.lua, to automatically - update a directory as soon as new revisions or certs arrive for - a given branch. + - contrib/monotone-run-script-post-netsync.lua, to automatically + update a directory as soon as new revisions or certs arrive for + a given branch. - - contrib/monotone.bash_completion had some improvemens. + - contrib/monotone.bash_completion had some improvemens. - - contrib/monotone.el had some improvements. + - contrib/monotone.el had some improvements. - Internal + Internal - - Internally, the concept of "projects" has been introduced. It - currently doesn't mean anything, but will be used later, with - policy branches and similar. + - Internally, the concept of "projects" has been introduced. It + currently doesn't mean anything, but will be used later, with + policy branches and similar. Wed Dec 27 09:57:48 UTC 2006 - 0.32 release. + 0.32 release. - Changes + Changes - - "mtn serve" no longer takes patterns on the command line. - Use the permissions hooks instead. + - "mtn serve" no longer takes patterns on the command line. + Use the permissions hooks instead. - - the name of the option that denoted the revision from which - "mtn log" should start logging was renamed from "--revision" - to "--from" + - the name of the option that denoted the revision from which + "mtn log" should start logging was renamed from "--revision" + to "--from" - - author selectors no longer have implicit wildcarding + - author selectors no longer have implicit wildcarding - - if you manually add entries to MTN/log while you are - working, in preparation for an eventual commit, you will now - be required to remove a "magic" template line from the file - before the commit will succeed. This, like the test for an - empty log file, helps to prevent accidents. + - if you manually add entries to MTN/log while you are + working, in preparation for an eventual commit, you will now + be required to remove a "magic" template line from the file + before the commit will succeed. This, like the test for an + empty log file, helps to prevent accidents. - - the "db regenerate_caches" migration command replaces the - previous "db regenerate_rosters", generalising the task of - rebuilding or generating cached data that may be added - across an upgrade. Like "db migrate", which upgrades the - database schema, this command fills in the data for new - features. In this release, as well as rosters, it also adds - "heights" information used to speed up topology operations. + - the "db regenerate_caches" migration command replaces the + previous "db regenerate_rosters", generalising the task of + rebuilding or generating cached data that may be added + across an upgrade. Like "db migrate", which upgrades the + database schema, this command fills in the data for new + features. In this release, as well as rosters, it also adds + "heights" information used to speed up topology operations. - Speed improvements + Speed improvements - - "mtn annotate file" and "mtn log file" are generally much - faster now, dependant on the number of revisions that - changed the file. Both commands as well as "mtn automate - toposort" make use of data called "heights" caching the - topological order of all revisions. In order to create and - use this data, the following must be run once for each db - after upgrading: + - "mtn annotate file" and "mtn log file" are generally much + faster now, dependant on the number of revisions that + changed the file. Both commands as well as "mtn automate + toposort" make use of data called "heights" caching the + topological order of all revisions. In order to create and + use this data, the following must be run once for each db + after upgrading: $ mtn -d mydb.mtn db regenerate_caches - New features + New features - - "mtn automate content_diff" + - "mtn automate content_diff" - - "mtn automate get_file_of" (same as get_file, but expects - a file path and optionally a revision) + - "mtn automate get_file_of" (same as get_file, but expects + a file path and optionally a revision) - - "mtn import" command + - "mtn import" command - - "mtn log --to" + - "mtn log --to" - - netsync_note_* hooks are given much more information, - inlcuding a http/smtp/etc style status code + - netsync_note_* hooks are given much more information, + inlcuding a http/smtp/etc style status code - - includedirpattern(dir, fileglob) function for hooks + - includedirpattern(dir, fileglob) function for hooks - Bugs fixed + Bugs fixed - - bug in "automate stdio" that would result in monotone - garbling its input in some circumstances fixed + - bug in "automate stdio" that would result in monotone + garbling its input in some circumstances fixed - - "mtn annotate file" and "mtn log file" are generally much - faster now, dependant on the number of revisions that - changed the file. Both commands as well as "mtn automate - toposort" make use of data called "heights" caching the - topological order of all revisions. + - "mtn annotate file" and "mtn log file" are generally much + faster now, dependant on the number of revisions that + changed the file. Both commands as well as "mtn automate + toposort" make use of data called "heights" caching the + topological order of all revisions. - - spawn_redirected hook function now understands a blank - filename to mean not to redirect that stream + - spawn_redirected hook function now understands a blank + filename to mean not to redirect that stream - - "mtn log" is now in proper topological order, also due to - the use of cached "heights" data + - "mtn log" is now in proper topological order, also due to + the use of cached "heights" data - - reset options between "automate stdio" commands + - reset options between "automate stdio" commands - - another compile fix for gcc3 + - another compile fix for gcc3 - - bug in localization code where option strings where not - always properly translated + - bug in localization code where option strings where not + always properly translated - Other + Other - - botan library upgraded to 1.6.0 + - botan library upgraded to 1.6.0 - - accommodate changes in boost 1.34 + - accommodate changes in boost 1.34 - - documentation for "mtn automate get_option" + - documentation for "mtn automate get_option" - - notes/ directory + - notes/ directory ============================================================ --- UPGRADE e535a17a2f948fd7ddee92916cf064439bc88584 +++ UPGRADE d58d62aebea44b98f7fa9dd48abe93da41526d52 @@ -1,4 +1,4 @@ -upgrading monotone to 0.33 +upgrading monotone to 0.34 ========================== How to read this file: @@ -16,7 +16,7 @@ If you are upgrading from: will be described there, not here. If you are upgrading from: - - 0.32 or earlier: The database format has changed. You must run + - 0.33 or earlier: The database format has changed. You must run (after remembering to take a backup copy): $ mtn -d mydb.mtn db migrate on each of your databases. ============================================================ --- docs/Additional-Lua-Functions.html a20e1a6abc7f30e909076b1f295832bb768f0ab2 +++ docs/Additional-Lua-Functions.html 14741bc4e27941a28822d5dcf446691c2c7afd63 @@ -36,7 +36,7 @@ hook writers. hook writers.
-
existonpath(possible_command)
+
existonpath(possible_command)
This function receives a string containing the name of an external program and returns 0 if it exists on path and is executable, -1 otherwise. @@ -46,46 +46,56 @@ for “xxdiff.exe”. program name. In the previous example, existonpath would search for “xxdiff.exe”. -
guess_binary(filespec)
+
get_confdir()
+Returns the path to the configuration directory, either implied or given +with --confdir. + +
get_ostype()
+Returns the operating system flavor as a string. + +
guess_binary_file_contents(filespec)
Returns true if the file appears to be binary, i.e. contains one or more of the following characters:
          0x00 thru 0x06
           0x0E thru 0x1a
           0x1c thru 0x1f
      
-
include(scriptfile)
+
include(scriptfile)
This function tries to load and execute the script contained into scriptfile. It returns true for success and false if there is an error. -
includedir(scriptpath)
+
includedir(scriptpath)
This function loads and executes in alphabetical order all the scripts contained into the directory scriptpath. If one of the scripts has an error, the functions doesn't process the remaining scripts and immediately returns false. -
includedirpattern(scriptpath, pattern)
+
includedirpattern(scriptpath, pattern)
This function loads and executes in alphabetical order all the scripts contained into the directory scriptpath that match the given pattern. If one of the scripts has an error, the functions doesn't process the remaining scripts and immediately returns false. -
is_executable(filespec)
+
is_executable(filespec)
This function returns true if the file is executable, false otherwise. On Windows this function returns always false. -
kill(pid [, signal])
+
kill(pid [, signal])
This function calls the kill() C library function on POSIX systems and TerminateProcess on Win32 (in that case pid is the process handle). If the optional signal parameter is missing, SIGTERM will be used. Returns 0 on success, -1 on error. -
make_executable(filespec)
+
make_executable(filespec)
This function marks the named file as executable. On Windows has no effect. -
mkstemp(template)
+
match(glob, string)
+Returns true if glob matches str, return false otherwise. + +
mkstemp(template)
Like its C library counterpart, mkstemp creates a unique name and returns a file descriptor for the newly created file. The value of template should be a pointer to a character buffer loaded @@ -107,28 +117,7 @@ For the definition of temp_file()< file in the standard TMP/TEMP directories. For the definition of temp_file(), see Default hooks. -
sleep(seconds)
-Makes the calling process sleep for the specified number of seconds. - -
spawn(executable [, args ...])
-Starts the named executable with the given arguments. Returns the -process PID on POSIX systems, the process handle on Win32 or -1 if -there was an error. -Calls fork/execvp on POSIX, CreateProcess on Win32. - -

Important notice:
-To spawn a process and wait for its completion, use the execute() -function, unless you need to run monotone with the --nostd -option. execute() builds on spawn() and wait() -in a standardized way. - -

wait(pid)
-Wait until the process with given PID (process handle on Win32) exits. -Returns two values: a result value and the exit code of the waited-for -process. -The exit code is meaningful only if the result value is 0. - -
parse_basic_io(data)
+
parse_basic_io(data)
Parse the string data, which should be in basic_io format. It returns nil if it can't parse the string; otherwise it returns a table. This will be a list of all statements, with each entry being a table having a "name" element that is @@ -150,7 +139,42 @@ the arguments. 4 = { name = "frob", args = { 1 = "oops" } } } -
+
regex.search(regexp, string)
+Returns true if a match for regexp is found in str, return +false otherwise. +
sleep(seconds)
+Makes the calling process sleep for the specified number of seconds. + +
spawn(executable [, args ...])
+Starts the named executable with the given arguments. Returns the +process PID on POSIX systems, the process handle on Win32 or -1 if +there was an error. +Calls fork/execvp on POSIX, CreateProcess on Win32. + +

Important notice:
+To spawn a process and wait for its completion, use the execute() +function, unless you need to run monotone with the --nostd +option. execute() builds on spawn() and wait() +in a standardized way. + +

spawn_pipe(executable [, args ...])
+Like spawn(), but returns three values, where the first two are the +subprocess' standard input and standard output, and the last is the +process PID on POSIX systems, the process handle on Win32 or -1 if +there was an error. + +
spawn_redirected(infile, outfile, errfile, executable [, args ...])
+Like spawn(), but with standard input, standard output and standard +error redirected to the given files. + +
wait(pid)
+Wait until the process with given PID (process handle on Win32) exits. +Returns two values: a result value and the exit code of the waited-for +process. +The exit code is meaningful only if the result value is 0. + + + ============================================================ --- docs/Automation.html f29c90fe440fea9f22ce4df65e66d34585a30014 +++ docs/Automation.html 9b44489b7ad04ddccdcf82ac6d5a75d6e0d46447 @@ -40,7 +40,7 @@ messages. messages.
-
mtn automate interface_version
+
mtn automate interface_version
Arguments:
None. @@ -69,7 +69,7 @@ None.
-
mtn automate heads [branch]
+
mtn automate heads [branch]
Arguments:
One branch name, branch. If none is given, the current default branch is used. @@ -96,7 +96,7 @@ If the given branch contains no members
-
mtn automate ancestors rev1 [rev2 [...]]
+
mtn automate ancestors rev1 [rev2 [...]]
Arguments:
One or more revision IDs, rev1, rev2, etc. @@ -129,7 +129,7 @@ an error message to stderr, and exits wi
-
mtn automate common_ancestors rev1 [rev2 [...]]
+
mtn automate common_ancestors rev1 [rev2 [...]]
Arguments:
One or more revision IDs, rev1, rev2, etc. @@ -162,7 +162,7 @@ an error message to stderr, and exits wi
-
mtn automate parents rev
+
mtn automate parents rev
Arguments:
One revision ID, rev. @@ -192,7 +192,7 @@ stdout, prints an error message to stder
-
mtn automate descendents rev1 [rev2 [...]]
+
mtn automate descendents rev1 [rev2 [...]]
Arguments:
One or more revision IDs, rev1, rev2, etc. @@ -225,7 +225,7 @@ an error message to stderr, and exits wi
-
mtn automate children rev
+
mtn automate children rev
Arguments:
One revision ID, rev. @@ -255,7 +255,7 @@ stdout, prints an error message to stder
-
mtn automate graph
+
mtn automate graph
Arguments:
None. @@ -292,7 +292,7 @@ None.
-
mtn automate erase_ancestors [rev1 [rev2 [...]]]
+
mtn automate erase_ancestors [rev1 [rev2 [...]]]
Arguments:
One or more revision IDs, rev1, rev2, etc. @@ -326,7 +326,7 @@ an error message to stderr, and exits wi
-
mtn automate toposort [rev1 [rev2 [...]]]
+
mtn automate toposort [rev1 [rev2 [...]]]
Arguments:
One or more revision IDs, rev1, rev2, etc. @@ -358,7 +358,7 @@ an error message to stderr, and exits wi
-
mtn automate ancestry_difference new [old1 [old2 [...]]]
+
mtn automate ancestry_difference new [old1 [old2 [...]]]
Arguments:
A “new” revision ID new, followed by zero or more “old” @@ -395,7 +395,7 @@ an error message to stderr, and exits wi
-
mtn automate leaves
+
mtn automate leaves
Arguments:
None. @@ -427,7 +427,7 @@ None.
-
mtn automate branches
+
mtn automate branches
Arguments:
None. @@ -454,7 +454,7 @@ None.
-
mtn automate tags [branch_pattern]
+
mtn automate tags [branch_pattern]
Arguments:
A branch pattern (optional). @@ -522,7 +522,7 @@ specified.
-
mtn automate select selector
+
mtn automate select selector
Arguments:
One selector (or combined selector). @@ -550,7 +550,7 @@ None.
-
mtn automate inventory
+
mtn automate inventory
Arguments:
None. @@ -681,8 +681,8 @@ the "/" character, file paths do not end 'M' the file is missing but is included in the current manifest -

Note that there are 45 possible status code combinations, some of which -are not valid, detailed below. +

Note that out of the 45 possible status code combinations, only 26 are valid, +detailed below.

          
           '   ' unchanged
@@ -694,25 +694,25 @@ are not valid, detailed below.
           ' A ' added (invalid, add should have associated patch)
           ' AP' added and patched
           ' AU' added but unknown (invalid)
-          ' AI' added but ignored (seems invalid, but may be possible?)
+          ' AI' added but ignored (invalid, added files are no longer ignored)
           ' AM' added but missing from the filesystem
           
           ' R ' rename target
           ' RP' rename target and patched
           ' RU' rename target but unknown (invalid)
-          ' RI' rename target but ignored (seems invalid, but may be possible?)
+          ' RI' rename target but ignored (invalid)
           ' RM' rename target but missing from the filesystem
           
           'D  ' dropped
           'D P' dropped and patched (invalid)
           'D U' dropped and unknown (still exists on the filesystem)
-          'D I' dropped and ignored (seems invalid, but may be possible?)
+          'D I' dropped and ignored
           'D M' dropped and missing (invalid)
           
           'DA ' dropped and added (invalid, add should have associated patch)
           'DAP' dropped and added and patched
           'DAU' dropped and added but unknown (invalid)
-          'DAI' dropped and added but ignored (seems invalid, but may be possible?)
+          'DAI' dropped and added but ignored (invalid, added files are no longer ignored)
           'DAM' dropped and added but missing from the filesystem
           
           'DR ' dropped and rename target
@@ -724,19 +724,19 @@ are not valid, detailed below.
           'R  ' rename source
           'R P' rename source and patched (invalid)
           'R U' rename source and unknown (still exists on the filesystem)
-          'R I' rename source and ignored (seems invalid, but may be possible?)
+          'R I' rename source and ignored
           'R M' rename source and missing (invalid)
           
           'RA ' rename source and added (invalid, add should have associated patch)
           'RAP' rename source and added and patched
           'RAU' rename source and added but unknown (invalid)
-          'RAI' rename source and added but ignored (seems invalid, but may be possible?)
+          'RAI' rename source and added but ignored (invalid, added files are no longer ignored)
           'RAM' rename source and added but missing from the filesystem
           
           'RR ' rename source and target
           'RRP' rename source and target and target patched
           'RRU' rename source and target and target unknown (invalid)
-          'RRI' rename source and target and target ignored (seems invalid, but may be possible?)
+          'RRI' rename source and target and target ignored (invalid)
           'RRM' rename source and target and target missing
      
@@ -778,7 +778,7 @@ message to stderr, and exits with status
-
mtn automate certs id
+
mtn automate certs id
Arguments:
A revision ID id, for which any certificates will be printed. @@ -852,7 +852,7 @@ or invalid prints an error message to st
-
mtn automate stdio
+
mtn automate stdio
Arguments:
none @@ -935,7 +935,7 @@ whatever error message would have been g
-
mtn automate get_revision
mtn automate get_revision id
+
mtn automate get_revision
mtn automate get_revision id
Arguments:
Specifying the option id argument outputs the changeset @@ -1031,7 +1031,7 @@ to stderr and exits with status 1.
-
mtn automate get_base_revision_id
+
mtn automate get_base_revision_id
Arguments:
None. @@ -1057,7 +1057,7 @@ message to stderr, and exits with status
-
mtn automate get_current_revision_id
+
mtn automate get_current_revision_id
Arguments:
None. @@ -1084,7 +1084,7 @@ message to stderr, and exits with status
-
mtn automate get_manifest_of
mtn automate get_manifest_of revid
+
mtn automate get_manifest_of
mtn automate get_manifest_of revid
Arguments:
Specifying the optional revid argument outputs the manifest for the @@ -1221,7 +1221,7 @@ message to stderr and exits with status
-
mtn automate attributes file
+
mtn automate attributes file
Arguments:
The argument file determines which file's attributes should be printed. @@ -1293,7 +1293,7 @@ message to stderr and exits with status
-
mtn automate content_diff [--revision=id1 [--revision=id2]] [files ...]
+
mtn automate content_diff [--revision=id1 [--revision=id2]] [files ...]
Arguments:
One or more file arguments restrict the diff output to these files, @@ -1346,7 +1346,7 @@ restrictions can't be applied, the comma
-
mtn automate get_file id
+
mtn automate get_file id
Arguments:
The id argument specifies the file hash of the file to be output. @@ -1375,7 +1375,7 @@ to stderr and exits with status 1.
-
mtn automate get_file_of filename [--revision=id]
+
mtn automate get_file_of filename [--revision=id]
Arguments:
The filename argument specifies the filename of the file to be output. @@ -1408,7 +1408,7 @@ with status 1.
-
mtn automate get_option option
+
mtn automate get_option option
Arguments:
The option argument specifies the option name of the option to be output. @@ -1433,7 +1433,7 @@ with status 1.
-
mtn automate keys
+
mtn automate keys
Arguments:
None. @@ -1475,7 +1475,7 @@ None.
-
mtn automate packet_for_rdata id
+
mtn automate packet_for_rdata id
Arguments:
The id specifies the revision to output an rdata packet for. @@ -1507,7 +1507,7 @@ and exits with status 1.
-
mtn automate packet_for_certs id
+
mtn automate packet_for_certs id
Arguments:
The id specifies the revision to output cert packets for. @@ -1565,7 +1565,7 @@ and exits with status 1.
-
mtn automate packet_for_fdata id
+
mtn automate packet_for_fdata id
Arguments:
The id specifies the file to output an fdata packet for. @@ -1595,7 +1595,7 @@ and exits with status 1.
-
mtn automate packet_for_fdelta from-id to-id
+
mtn automate packet_for_fdelta from-id to-id
Arguments:
The from-id specifies the file to use as the base of the delta, @@ -1627,7 +1627,7 @@ message to stderr and exits with status
-
mtn automate get_content_changed id file
+
mtn automate get_content_changed id file
Arguments:
The id specifies a revision ID, from which content change calculations will be based. @@ -1659,7 +1659,7 @@ message to stderr and exits with status
-
mtn automate get_corresponding_path source_id file target_id
+
mtn automate get_corresponding_path source_id file target_id
Arguments:
The source_id specifies a revision ID in which file is current extant. @@ -1697,6 +1697,160 @@ 1. Note that file not existin
+
mtn automate db_get domain name
+
+
Arguments:
+The domain and name specify the database variable +which is returned. + +
Added in:
+4.1 + +
Purpose:
+Read a database variable, see also Vars. + +
Sample output:
+
           
+          off.net 
+     
+ +
Output format:
+Exactly the variable's content. Since this command is mainly intended for +automate stdio it will not add a trailing newline. + +
Error conditions:
+If the variable is unknown prints an error message to stderr and exits with +status 1. + +
+ +
mtn automate db_put domain name value
+
+
Arguments:
+The domain and name specify the database variable +which is changed to value. + +
Added in:
+4.1 + +
Purpose:
+Change a database variable, see also Vars. + +
Sample usage:
+
           
+          mtn automate db_set database default-server off.net 
+     
+ +
Output format:
+No output. + +
Error conditions:
+None. + +
+ +
mtn automate put_file [base-id] contents
+
+
Arguments:
+The optional base-id specifies a file-id on which the contents are +based on. This is used for delta encoding. contents are the contents of +the new file. + +
Added in:
+4.1 + +
Purpose:
+Preparation of a workspace-less commit. +See also automate put_revision. Normally used via +automate stdio. + +
Sample output:
+
           
+          70a0f283898a18815a83df37c902e5f1492e9aa2 
+     
+ +
Output format:
+The sha1 sum of the contents, hex encoded. + +
Error conditions:
+If the optional base id is unknown prints an error message to stderr and +exits with status 1. + +
+ +
mtn automate put_revision revision-data
+
+
Arguments:
+revision-data is the new revision. See example below. Note that +the new_manifest entry is ignored – put_revision will +ignore whatever you put here and calculate the correct manifest id +itself. (However, for now, you must put 40 hex digits here – it's +just that which particular digits you put are entirely irrelevant. +All zeros is a good choice.) Monotone will also canonicalize your +whitespace automatically. You do not need to worry about getting just +the right amount of indentation in front of each line. However, +everything else about your revision must be valid. + +
Added in:
+4.1 + +
Purpose:
+Workspace-less commit. Normally used via automate stdio. + +
Sample argument:
+
               format_version "1"
+               
+               new_manifest [0000000000000000000000000000000000000004]
+               
+               old_revision []
+               
+               add_dir ""
+               
+               add_file "foo"
+               content [5bf1fd927dfb8679496a2e6cf00cbe50c1c87145]
+          
+
Sample output:
+
           
+          4c2c1d846fa561601254200918fba1fd71e6795d 
+     
+ +
Output format:
+The new revision id, hex encoded. + +
Error conditions:
+If the changeset is invalid prints an error message to stderr and +exits with status 1. May abort on invalid formats. If the revision is +already present in the database, prints a message to stderr noting +this fact, but otherwise works as normal. + +
+ +
mtn automate cert revision name value
+
+
Arguments:
+revision is an existing revision, name is the certificate name +and value its value. + +
Added in:
+4.1 + +
Purpose:
+automate stdio capable variant of mtn cert. + +
Sample usage:
+
           
+          mtn automate cert 4c2c1d846fa561601254200918fba1fd71e6795d author address@hidden 
+     
+ +
Output format:
+No output. + +
Error conditions:
+If the revision is invalid prints an error message to stderr and +exits with status 1. + +
+
============================================================ --- docs/CVS-Phrasebook.html 74d9762c96bb7e130c3b086205599ecbc668c36a +++ docs/CVS-Phrasebook.html e790524d54a2332bbf14e04fed7676ba6df56147 @@ -227,9 +227,8 @@ Directories are created as needed, and e


Monotone does not require that you erase a file from the workspace -before you drop it. Dropping a file merely removes its entry in the -manifest of the current revision unless you give it the --execute -flag, which tells monotone to go ahead and also remove it from the filesystem. +before you drop it. Dropping a file both removes its entry in the +manifest of the current revision and removes it from the filesystem.

Viewing History

============================================================ --- docs/Certificate.html f5f761765039f3768e6299088025b22124e7f795 +++ docs/Certificate.html c5e3af1fe0b79b52af89a16404c5f0351ef56fda @@ -35,7 +35,7 @@ Up: 5.6 Certificate
-
mtn cert id certname
mtn cert id certname certval
+
mtn cert id certname
mtn cert id certname certval
These commands create a new certificate with name certname, for a revision with version id. The id argument can be a selector using certs already on the revision, such as h:branchname. @@ -43,18 +43,18 @@ Otherwise the certificate value is read

If certval is provided, it is the value of the certificate. Otherwise the certificate value is read from stdin. -

mtn approve id
+
mtn approve id
This command is a synonym for mtn cert id branch branchname where branchname is the current branch name (either deduced from the workspace or from the --branch option). -
mtn comment id
mtn comment id comment
+
mtn comment id
mtn comment id comment
These commands are synonyms for mtn cert id comment comment. If comment is not provided, it is read from stdin. -
mtn tag id tagname
+
mtn tag id tagname
This command associates the symbolic name tagname with the revision id, so that symbolic name can later be used in Selectors for specifying revisions for commands like @@ -63,7 +63,7 @@ revision id, so that symbolic

This command is a synonym for mtn cert id tag tagname. -

mtn testresult id 0
mtn testresult id 1
+
mtn testresult id 0
mtn testresult id 1
These commands are synonyms for mtn cert id testresult 0 or mtn cert id testresult 1. ============================================================ --- docs/Database.html ba54f8344b2ab01c070261b7f1d4bccba1ad8cdb +++ docs/Database.html 143826efd443bd9e9a0d3b4c19700e4a560e4e10 @@ -35,33 +35,33 @@ Up: 5.8 Database
-
mtn set domain name value
+
mtn set domain name value
Associates the value value to name in domain domain. See Vars for more information. -
mtn unset domain name
+
mtn unset domain name
Deletes any value associated with name in domain. See Vars for more information. -
mtn db init --db=dbfile
+
mtn db init --db=dbfile
This command initializes a new monotone database at dbfile. -
mtn db info --db=dbfile
+
mtn db info --db=dbfile
This command prints information about the monotone database dbfile, including its schema version and various table size statistics. -
mtn db version --db=dbfile
+
mtn db version --db=dbfile
This command prints out just the schema version of the monotone database dbfile. -
mtn db dump --db=dbfile
+
mtn db dump --db=dbfile
This command dumps an SQL statement representing the entire state of dbfile to the standard output stream. It is a very low-level command, and produces the most “recoverable” dumps of your database possible. It is sometimes also useful when migrating databases between variants of the underlying SQLite database format. -
mtn db load --db=dbfile
+
mtn db load --db=dbfile
This command applies a raw SQL statement, read from the standard input stream, to the database dbfile. It is most useful when loading a database dumped with the dump command. @@ -70,7 +70,7 @@ database is included in the dum database is included in the dump, so you should not try to init your database before a load. -
mtn db migrate --db=dbfile
+
mtn db migrate --db=dbfile
This command attempts to migrate the database dbfile to the newest schema known by the version of monotone you are currently running. If the migration fails, no changes should be made to the @@ -80,7 +80,7 @@ during migration. a copy of it before migrating, in case there is an untrapped error during migration. -
mtn db check --db=dbfile
+
mtn db check --db=dbfile
Monotone always works hard to verify the data it creates and accesses. For instance, if you have hard drive problems that corrupt data in monotone's database, and you attempt to retrieve this data, then @@ -210,7 +210,7 @@ and revision is correct.

This command also verifies that the sha1 hash of every file, manifest, and revision is correct. -

mtn db kill_rev_locally id
+
mtn db kill_rev_locally id
This command “kills”, i.e., deletes, a given revision, as well as any certs attached to it. It has an ugly name because it is a dangerous command; it permanently and irrevocably deletes historical information @@ -237,7 +237,7 @@ work you can extract id's dat work you can extract id's data. -
mtn db kill_branch_certs_locally branch
+
mtn db kill_branch_certs_locally branch
This command “kills” a branch by deleting all branch certs with that branch name. You should consider carefully whether you want to use it, because it can irrevocably delete important information. It does not @@ -251,7 +251,7 @@ certificates locally. you sync, unless the owners of those databases also delete those certificates locally. -
mtn db kill_tag_locally tag
+
mtn db kill_tag_locally tag
This command “kills” a tag by deleting all tag certs with that tag name. You should consider carefully whether you want to use it, because it can irrevocably delete important information. It does not modify or @@ -263,7 +263,7 @@ certificates locally. sync, unless the owners of those databases also delete those certificates locally. -
mtn db execute sql-statement
+
mtn db execute sql-statement
This is a debugging command which executes sql-statement against your database, and prints any results of the expression in a tabular form. It can be used to investigate the state of your database, or ============================================================ --- docs/Default-hooks.html ae06201ff21759eea0f55b98ae0642245c1e32c8 +++ docs/Default-hooks.html dc8bd4e2e64324049f8c975985d5d62893abcb9b @@ -106,7 +106,7 @@ attr_init_functions["mtn:manual_merge"] attr_init_functions["mtn:manual_merge"] = function(filename) if (binary_file(filename)) then - return "true" -- binary files must merged manually + return "true" -- binary files must be merged manually else return nil end @@ -141,7 +141,9 @@ function ignore_file(name) if (ignfile ~= nil) then local line = ignfile:read() while (line ~= nil) do - table.insert(ignored_files, line) + if line ~= "" then + table.insert(ignored_files, line) + end line = ignfile:read() end io.close(ignfile) ============================================================ --- docs/Generating-Keys.html 139a29b4bfd984210460a44f080db9933af82b10 +++ docs/Generating-Keys.html f97c0998cf7d223ef4e2271f40b37b838a254bda @@ -91,8 +91,35 @@ to re-enter his passphrase in order to p address@hidden, so it indicates that Jim's key-pair has been successfully generated and stored. On subsequent commands, Jim will need to re-enter his passphrase in order to perform security-sensitive -tasks. Jim isn't very worried about security (and, more importantly, it -simplifies the tutorial text to skip the passphrase prompts) so he +tasks. + +

Pretty soon Jim gets annoyed when he has to enter his passphrase every +time he invokes mtn (and, more importantly, it simplifies the +tutorial text to skip the passphrase prompts) so he decides to use +ssh-agent to store his key. He does this by using the +ssh_agent_export command to export his key into a format that +ssh-agent can understand and adding it with ssh-add. + +

     $ mtn ssh_agent_export ~/.ssh/id_monotone
+     enter passphrase for key ID address@hidden:
+     enter new passphrase for key ID address@hidden:
+     confirm passphrase for key ID address@hidden:
+     $ chmod 600 ~/.ssh/id_monotone
+
+

From now on, Jim just needs to add his key to ssh-agent when he logs in +and he will not need to enter his passphrase every time he uses monotone. + +

     $ ssh-agent /bin/bash
+     $ ssh-add ~/.ssh/id_monotone
+     Enter passphrase for /home/user/.ssh/id_monotone:
+     Identity added: /home/user/.ssh/id_monotone (/home/user/.ssh/id_monotone)
+     $ mtn ci -m"Changed foo to bar"
+     $ mtn push
+
+

The following procedure is deprecated and not suggested for general use +as it is very insecure. + +

Jim isn't very worried about security so he decides to store his passphrase in his monotonerc file. He does this by writing a hook function which returns the passphrase: ============================================================ --- docs/Hooks.html e26a3fd83f21be45c05d68e3eba3b33e14bf599e +++ docs/Hooks.html dee4937805e874bfab1e2e43afd261d2e044d7a9 @@ -46,7 +46,7 @@ are taken. are taken.

-
note_commit (new_id, revision, certs)
+
note_commit (new_id, revision, certs)
Called by monotone after the version new_id is committed. The second parameter, revision is the text of the revision, what would be given by mtn automate get_revision new_id. The third @@ -61,7 +61,7 @@ should not perform any security-critical commit-notification systems such as mailing lists or news services. It should not perform any security-critical operations. -
note_netsync_start (session_id, my_role, sync_type,
remote_host, remote_keyname, includes, excludes) +
note_netsync_start (session_id, my_role, sync_type,
remote_host, remote_keyname, includes, excludes)

Called by monotone before any other of the netsync notification hooks are called. The session_id helps keep track of the current netsync @@ -92,7 +92,7 @@ The include and exclude patterns used by

-
note_netsync_revision_received (new_id, revision, certs, session_id)
+
note_netsync_revision_received (new_id, revision, certs, session_id)
Called by monotone after the revision new_id is received through netsync. revision is the text of the revision, what would be given by mtn automate get_revision new_id. certs is a @@ -104,7 +104,7 @@ tracking, you can ignore that variable e note_netsync_end. If you're not interested in that type of tracking, you can ignore that variable entirely. -
note_netsync_cert_received (rev_id, key, name, value, session_id)
+
note_netsync_cert_received (rev_id, key, name, value, session_id)
Called by monotone after a cert is received through netsync, if the revision that the cert is attached to was not also received in the same netsync operation. rev_id is the revision id that the cert is attached to, @@ -115,14 +115,14 @@ tracking, you can ignore that variable e note_netsync_end. If you're not interested in that type of tracking, you can ignore that variable entirely. -
note_netsync_pubkey_received (keyname, session_id)
+
note_netsync_pubkey_received (keyname, session_id)
Called by monotone after a pubkey is received through netsync. keyname is the name of the key received. There is no default definition for this hook. session_id is used together with note_netsync_start and note_netsync_end. If you're not interested in that type of tracking, you can ignore that variable entirely. -
note_netsync_end (session_id, status,
bytes_in, bytes_out, certs_in, certs_out, +
note_netsync_end (session_id, status,
bytes_in, bytes_out, certs_in, certs_out, revs_in, revs_out, keys_in, keys_out)

Called by monotone after all other the netsync notification hooks have @@ -170,6 +170,14 @@ data was transferred. have been transferred, xx2 means no data was transferred, and xx0 means all data was transferred. +

note_mtn_startup (...)
+Called by monotone when it is first started, this hook was added so that +usage of monotone could be monitored for user interface testing. Note +that by default, no monitoring occurs. The arguments to the hook +function are the arguments to monotone, without the initial +mtn command. They can be accessed through the lua arg +variable which contains the variable list of arguments. +

6.1.2 User Defaults

@@ -179,7 +187,7 @@ prompted for. prompted for.
-
get_branch_key (branchname)
+
get_branch_key (branchname)
Returns a string which is the name of an rsa private key used to sign certificates in a particular branch branchname. There is no default definition for this hook. The command-line option @@ -189,7 +197,7 @@ to use the unique private key. --key=keyname option; monotone will guess that you want to use the unique private key. -
get_passphrase (keypair_id)
+
get_passphrase (keypair_id)
Returns a string which is the passphrase used to encrypt the private half of keypair_id in your database, using the arc4 symmetric cipher. keypair_id is a Lua string containing the label that you @@ -198,22 +206,33 @@ a passphrase each time it needs to use a this hook is not defined or returns false, monotone will prompt you for a passphrase each time it needs to use a private key. -
get_author (branchname)
+
get_author (branchname, keypair_id)
Returns a string which is used as a value for automatically generated author certificates when you commit changes to -branchname. Generally this hook remains undefined, and monotone -selects your signing key name for the author certificate. You can use -this hook to override that choice, if you like. +branchname with the keypair identity keypair_id. Generally +this hook remains undefined, and monotone selects your signing key name +for the author certificate. You can use this hook to override that +choice, if you like. -

This hook has no default definition, but a possible definition might be: -

          function get_author(branchname)
+     

This hook has no default definition, but a couple of possible +definitions might be: +

          function get_author(branchname, keypair_id)
+                  -- Key pair identity ignored.
                   local user = os.getenv("USER")
                   local host = os.getenv("HOSTNAME")
                   if ((user == nil) or (host == nil)) then return nil end
                   return string.format("address@hidden", user, host)
           end
      
-
edit_comment (commentary, user_log_message)
+
          function get_author(branchname, keypair_id)
+                  -- Branch name ignored.
+                  if (keypair_id == "address@hidden") then
+                          return "Joe Random <address@hidden>"
+                  end
+                  return keypair_id
+          end
+     
+
edit_comment (commentary, user_log_message)
Returns a log entry for a given set of changes, described in commentary. The commentary is identical to the output of mtn status. This hook is intended to interface with @@ -230,7 +249,7 @@ the system up for another edit/commit cy

For the default definition of this hook, see Default hooks. -

persist_phrase_ok ()
+
persist_phrase_ok ()
Returns true if you want monotone to remember the passphrase of a private key for the duration of a single command, or false if you want monotone to prompt you for a passphrase for each certificate @@ -243,7 +262,7 @@ probably want this hook to return return true end
-
use_inodeprints ()
+
use_inodeprints ()
Returns true if you want monotone to automatically enable Inodeprints support in all workspaces. Only affects working copies created after you modify the hook. @@ -253,7 +272,7 @@ copies created after you modify the hook return false end -
ignore_file (filename)
+
ignore_file (filename)
Returns true if filename should be ignored while adding, dropping, or moving files. Otherwise returns false. This is most important when performing recursive actions on directories, which @@ -266,7 +285,7 @@ default definition of this hook, see Default hooks. -
ignore_branch (branchname)
+
ignore_branch (branchname)
Returns true if branchname should be ignored while listing branches. Otherwise returns false. This hook has no default definition, therefore the default behavior is to list all branches. @@ -283,7 +302,7 @@ changed. changed.
-
get_netsync_read_permitted (branch, identity)
+
get_netsync_read_permitted (branch, identity)
Returns true if a peer authenticated as key identity should be allowed to read from your database certs, revisions, manifests, and files associated with branch; otherwise false. @@ -325,7 +344,7 @@ key fingerprints of each key in your dat key fingerprints of each key in your database, as key ID strings are “convenience names”, not security tokens. -
get_netsync_write_permitted (identity)
+
get_netsync_write_permitted (identity)
Returns true if a peer authenticated as key identity should be allowed to write into your database certs, revisions, manifests, and files; otherwise false. The default definition of this hook reads a file @@ -364,7 +383,7 @@ a TCP socket. a TCP socket.
-
get_netsync_connect_command (uri, args)
+
get_netsync_connect_command (uri, args)
Returns a table describing a command to run to connect to the specified host. The uri argument is a table containing between 0 and 7 components: @@ -443,7 +462,7 @@ components: return argv end -
use_transport_auth (uri)
+
use_transport_auth (uri)
Returns a boolean indicating whether monotone should use transport authentication mechanisms when communicating with uri. If this hook fails, the return value is assumed to be true. The form of @@ -469,7 +488,7 @@ authentication assumptions. end end -
get_mtn_command(host)
+
get_mtn_command(host)
Returns a string containing the monotone command to be executed on host when communicating over ssh. The host argument is a string containing the name of the host to which @@ -501,7 +520,7 @@ valid revisions, according to their own valid revisions, according to their own preferences and purposes.
-
get_revision_cert_trust (signers, id, name, val)
+
get_revision_cert_trust (signers, id, name, val)
Returns whether or not you trust the assertion name=value on a given revision id, given a valid signature from all the keys in signers. The signers @@ -547,7 +566,7 @@ the revision has been approved by an ext the revision has been approved by an extra “reviewer” who used the approve command. -
accept_testresult_change (old_results, new_results)
+
accept_testresult_change (old_results, new_results)
This hook is used by the update algorithm to determine whether a change in test results between update source and update target is acceptable. The hook is called with two tables, each of which maps a @@ -571,7 +590,7 @@ version carrying the old_results

This definition accepts only those updates which preserve the set of -true test results from update source to target. If no rest +true test results from update source to target. If no test results exist, this hook has no affect; but once a true test result is present, future updates will require it. If you want a more lenient behavior you must redefine this hook. @@ -585,7 +604,7 @@ customisation of the way file difference customisation of the way file differences are shown.

-
get_encloser_pattern (file_path)
+
get_encloser_pattern (file_path)
Called for each file when diff is given the --show-encloser option (and not the --external option). file_path is the pathname of the @@ -600,7 +619,7 @@ make it to the default for that language hook; and if you send it to the monotone developers, we will likely make it to the default for that language. -
external_diff (file_path, old_data, new_data, is_binary,
diff_args, old_rev, new_rev) +
external_diff (file_path, old_data, new_data, is_binary,
diff_args, old_rev, new_rev)

Called for each file when diff is given the --external option. file_path is the pathname of the @@ -635,7 +654,7 @@ you have a tool specific to certain file

-
merge3 (ancestor_path, left_path, right_path, merged_path, ancestor_text, left_text, right_text)
+
merge3 (ancestor_path, left_path, right_path, merged_path, ancestor_text, left_text, right_text)
This hook is called to resolve merges that monotone could not resolve automatically. The actual ancestor, left, and right contents of the file are passed in the ancestor_text, left_text, and @@ -658,7 +677,7 @@ local system. For details, see the code local system. For details, see the code in Default hooks.

-

get_preferred_merge3_command(tbl)
+
get_preferred_merge3_command(tbl)
Returns the results of running an external merge on three strings. tbl wraps up the various arguments for each merge command and is always provided by merge3. If there is a particular editor @@ -678,7 +697,7 @@ expand them to their full form.

For more detail on the use of selectors, see Selectors.

-
expand_selector (str)
+
expand_selector (str)
Attempts to expand str as a selector. Expansion generally means providing a type prefix for the selector, such as a: for authors or d: for dates. This hook is called once for each element of a @@ -686,7 +705,7 @@ evaluation of the selector. For the defa evaluation of the selector. For the default definition of this hook, see Default hooks. -
expand_date (str)
+
expand_date (str)
Attempts to expand str as a date expression. Expansion means recognizing and interpreting special words such as yesterday or 6 months ago and converting them into well formed date @@ -709,7 +728,7 @@ according to its attributes when the wor according to its attributes when the workspace is changed.
-
attr_functions [attribute] (filename, value)
+
attr_functions [attribute] (filename, value)
This is not a hook function, but a table of hook functions. Each entry in the table attr_functions, at table entry attribute, is a function taking a file name filename @@ -722,17 +741,17 @@ lists, or special file types. platform-specific attributes, such as permission bits, access control lists, or special file types. -

By default, there is only one entry in this table, for the execute +

By default, there is only one entry in this table, for the mtn:execute attribute. Its definition is: -

          attr_functions["execute"] =
+     
          attr_functions["mtn:execute"] =
             function(filename, value)
                   if (value == "true") then
                    make_executable(filename)
                 end
              end
      
-
attr_init_functions [attribute] (filename)
+
attr_init_functions [attribute] (filename)
This is not a hook function, but a table of hook functions. Each entry in the table attr_init_functions, at table entry attribute, is a function taking a file (or @@ -741,20 +760,21 @@ hook functions is called once for each f hook functions is called once for each file during an add.

By default, there are only two entries in this table, for the -execute and manual_merge attributes. Their definition is: +mtn:execute and mtn:manual_merge attributes. Their +definition is: -

          attr_init_functions["execute"] =
+     
          attr_init_functions["mtn:execute"] =
              function(filename)
                 if (is_executable(filename)) then
                   return "true"
                 else
                   return nil
-                  end
-            end
-          attr_init_functions["manual_merge"] =
+                end
+             end
+          attr_init_functions["mtn:manual_merge"] =
              function(filename)
                 if (binary_file(filename)) then
-                  return "true" -- binary files must merged manually
+                  return "true" -- binary files must be merged manually
                 else
                   return nil
                 end
@@ -771,7 +791,7 @@ allow a client to validate or reject cer
 allow a client to validate or reject certain behaviors.
 
      
-
validate_commit_message (message, revision_text, branchname)
+
validate_commit_message (message, revision_text, branchname)
This hook is called after the user has entered his/her commit message. message is the commit message that the user has entered and revision_text is the full text of the changes for this revision, ============================================================ --- docs/Index.html a2a84699df933b40ff4c3472b6e52b378376b776 +++ docs/Index.html cbf954e9e01c95e85abc8745f5e21ebe4a4dd262 @@ -32,220 +32,234 @@ Up: Index ============================================================ --- docs/Informative.html a7a6c4c58de1d313ecf3dd8915b4de276ce1c2d6 +++ docs/Informative.html 468bbecb358334b5ff81068ae5c000756c8ad89e @@ -35,7 +35,7 @@ Up: 5.4 Informative
-
mtn status
mtn status pathname...
+
mtn status
mtn status pathname...
This command prints a description of the “status” of your workspace. In particular, it prints:
    @@ -57,7 +57,7 @@ changed within the current subdirectory Specifying only the pathname "." will restrict status to files changed within the current subdirectory of the workspace. -
    mtn log
    mtn log [--last=n] [--next=n] [--from=id [...]] [--to=id [...]] [--brief] [--no-merges] [--no-files] [--diffs] [file [...]]
    +
    mtn log
    mtn log [--last=n] [--next=n] [--from=id [...]] [--to=id [...]] [--brief] [--no-merges] [--no-files] [--diffs] [file [...]]
    This command prints out a log, in reverse-ancestry order, of small history summaries. Each summary contains author, date, changelog and comment information associated with a revision. @@ -96,7 +96,7 @@ where those files are changed.

    If one or more files are given, the command will only log the revisions where those files are changed. -

    mtn annotate file
    mtn annotate [--revision=id] [--brief] file
    +
    mtn annotate file
    mtn annotate [--revision=id] [--brief] file
    Dumps an annotated copy of the file to stdout. In the absence of the --brief flag, each line of the file is translated to <revision id>: <line> in the output, where <revision id> @@ -108,7 +108,7 @@ character and the date field is truncate author cert value is truncated at the first @ or space character and the date field is truncated to remove the time of day. -
    mtn complete file partial-id
    mtn complete [--brief] key partial-id
    mtn complete [--brief] revision partial-id
    +
    mtn complete file partial-id
    mtn complete [--brief] key partial-id
    mtn complete [--brief] revision partial-id
    These commands print out all known completions of a partial sha1 value, listing completions which are file, manifest or revision IDs depending on which variant is used. For @@ -134,7 +134,7 @@ present users with additional informatio 01f992577bd8bcdcade0f89e724fd5dc2d2bbe8a address@hidden 2005-05-11T05:19:29 01faad191d8d0474777c70b4d606782942333a78 address@hidden 2005-04-11T04:24:01
-
mtn diff [--unified] [--show-encloser]
mtn diff --context [--show-encloser]
mtn diff --external [--diff-args=argstring]
mtn diff pathname...
mtn diff --revision=id
mtn diff --revision=id pathname...
mtn diff --revision=id1 --revision=id2
mtn diff --revision=id1 --revision=id2 pathname...
+
mtn diff [--unified] [--show-encloser]
mtn diff --context [--show-encloser]
mtn diff --external [--diff-args=argstring]
mtn diff pathname...
mtn diff --revision=id
mtn diff --revision=id pathname...
mtn diff --revision=id1 --revision=id2
mtn diff --revision=id1 --revision=id2 pathname...
These commands print out GNU “unified diff format” textual difference listings between various manifest versions. With no --revision options, diff will print the differences between the @@ -198,7 +198,7 @@ passed to it, and so on, are controlled passed to it, and so on, are controlled by the hook external_diff; see Hooks for more details. -
mtn list certs id
mtn ls certs id
+
mtn list certs id
mtn ls certs id
These commands will print out a list of certificates associated with a particular revision id. Each line of the print out will indicate: @@ -245,24 +245,24 @@ branch: : * testsuite.at: Call t_cross.at. :
-
mtn list keys
mtn ls keys
mtn list keys pattern
mtn ls keys pattern
These commands list rsa keys held in your keystore and current database. +
mtn list keys
mtn ls keys
mtn list keys pattern
mtn ls keys pattern
These commands list rsa keys held in your keystore and current database. They do not print out any cryptographic information; they simply list the names of public and private keys you have on hand.

If pattern is provided, it is used as a glob to limit the keys listed. Otherwise all keys in your database are listed. -

mtn list branches
mtn ls branches
+
mtn list branches
mtn ls branches
This command lists all known branches in your database. -
mtn list tags
mtn ls tags
+
mtn list tags
mtn ls tags
This command lists all known tags in your database. -
mtn list vars
mtn ls vars
mtn list vars domain
mtn ls vars domain
+
mtn list vars
mtn ls vars
mtn list vars domain
mtn ls vars domain
This command lists all vars in your database, or all vars within a given domain. See Vars for more information. -
mtn list known
mtn ls known
mtn list known pathname...
mtn ls known pathname...
+
mtn list known
mtn ls known
mtn list known pathname...
mtn ls known pathname...
This command lists all files which would become part of the manifest of the next revision if you committed your workspace at this point. @@ -275,7 +275,7 @@ files to the current subdirectory of the Specifying only the pathname "." will restrict the search for known files to the current subdirectory of the workspace. -
mtn list unknown
mtn ls unknown
mtn list unknown pathname...
mtn ls unknown pathname...
+
mtn list unknown
mtn ls unknown
mtn list unknown pathname...
mtn ls unknown pathname...
This command lists all files in your workspace that monotone is either ignoring or knows nothing about. @@ -288,7 +288,7 @@ files to the current subdirectory of the Specifying only the pathname "." will restrict the search for unknown files to the current subdirectory of the workspace. -
mtn list ignored
mtn ls ignored
mtn list ignored pathname...
mtn ls ignored pathname...
+
mtn list ignored
mtn ls ignored
mtn list ignored pathname...
mtn ls ignored pathname...
This command lists all files in your workspace that monotone is intentionally ignoring, due to the results of the ignore_file (filename) hook. @@ -302,7 +302,7 @@ files to the current subdirectory of the Specifying only the pathname "." will restrict the search for ignored files to the current subdirectory of the workspace. -
mtn list missing
mtn ls missing
mtn list missing pathname...
mtn ls missing pathname...
+
mtn list missing
mtn ls missing
mtn list missing pathname...
mtn ls missing pathname...
This command lists all files in your workspace's base manifest, which are not present in the workspace. @@ -315,7 +315,7 @@ files to the current subdirectory of the Specifying only the pathname "." will restrict the search for missing files to the current subdirectory of the workspace. -
mtn list changed
mtn ls changed
mtn list changed pathname...
mtn ls changed pathname...
+
mtn list changed
mtn ls changed
mtn list changed pathname...
mtn ls changed pathname...
This command lists all files in your workspace that have changed compared to the base revision, including files that are dropped, added or renamed. @@ -329,7 +329,7 @@ files to the current subdirectory of the Specifying only the pathname "." will restrict the search for known files to the current subdirectory of the workspace. -
mtn show_conflicts rev rev
+
mtn show_conflicts rev rev
This command shows what conflicts would need to be resolved in order to merge the given revisions.
============================================================ --- docs/Key-and-Cert-Trust.html 7d8a7af23907cbe0482443b324bec1537d12be78 +++ docs/Key-and-Cert-Trust.html 4e03afc439a3c78f282345064f1491799a309e57 @@ -35,7 +35,7 @@ Up: 5.5 Key and Cert Trust
-
mtn genkey keyid
+
mtn genkey keyid
This command generates an rsa public/private key pair, using a system random number generator, and stores it in your keystore under the key name keyid. @@ -51,17 +51,17 @@ careful using this hook. increases the risk of a key compromise on your local computer. Be careful using this hook. -
mtn dropkey keyid
+
mtn dropkey keyid
This command drops the public and/or private key. If both exist, both are dropped, if only one exists, it is dropped. This command should be used with caution as changes are irreversible without a backup of the key(s) that were dropped. -
mtn chkeypass id
+
mtn passphrase id
This command lets you change the passphrase of the private half of the key id. -
mtn trusted id certname certval signers
+
mtn trusted id certname certval signers
This command lets you test your revision trust hook get_revision_cert_trust (see Hook Reference). You pass it a revision ID, a certificate name, a certificate value, and one or more @@ -69,6 +69,37 @@ those keys. Monotone would trust a cert on that revision with that value signed by those keys. +
mtn ssh_agent_export filename
+This command will export your private key in a format that ssh-agent +can read (PKCS8, PEM). You will be asked for your current key's password +and a new password to encrypt the key with. The key will be printed to +stdout. Once you have put this key in a file simply add it to ssh-agent +and you will only have to enter your key password once as ssh-agent +will cache the key for you. + +
          $ mtn ssh_agent_export ~/.ssh/id_monotone
+          enter passphrase for key ID address@hidden:
+          enter new passphrase for key ID address@hidden:
+          confirm passphrase for key ID address@hidden:
+          $ chmod 600 ~/.ssh/id_monotone
+          $ ssh-agent /bin/bash
+          $ ssh-add ~/.ssh/id_monotone
+          Enter passphrase for /home/user/.ssh/id_monotone:
+          Identity added: /home/user/.ssh/id_monotone (/home/user/.ssh/id_monotone)
+          $ mtn ci -m"Changed foo to bar"
+          $ mtn push
+     
+

You can also use the --ssh-sign option to control whether ssh-agent will +be used for signing. If set to yes, ssh-agent will be used to sign. If your +key has not been added to ssh-agent monotone will fall back to its internal signing +code and ask you for your password. If set to only, monotone will sign only +with ssh-agent. If set to no, monotone will always use its internal signing +code even if ssh-agent is running and has your monotone key loaded. If set to +check, monotone will sign with both ssh-agent (if your key is loaded into +it) and monotone's internal signing code, then compare the results. check +will be removed at some future time as it is meant only for testing and will not +work with all signing algorithms. +

============================================================ --- docs/Network.html e36efb76b4ebb2d90f47c846b8b21cd24ac6d75d +++ docs/Network.html ea1beb7ca4c48d2ccae750e1a01baa1143785849 @@ -35,7 +35,7 @@ Up: 5.3 Network
-
mtn serve [--bind=[address][:port]]
mtn serve --stdio [--no-transport-auth]
mtn pull [--set-default] [uri-or-address] [glob [...] [--exclude=exclude-glob]]]
mtn push [--set-default] [uri-or-address] [glob [...] [--exclude=exclude-glob]]]
mtn sync [--set-default] [uri-or-address] [glob [...] [--exclude=exclude-glob]]]
+
mtn serve [--bind=[address][:port]]
mtn serve --stdio [--no-transport-auth]
mtn pull [--set-default] [uri-or-address] [glob [...] [--exclude=exclude-glob]]]
mtn push [--set-default] [uri-or-address] [glob [...] [--exclude=exclude-glob]]]
mtn sync [--set-default] [uri-or-address] [glob [...] [--exclude=exclude-glob]]]
These commands operate the “netsync” protocol built into monotone. This is a custom protocol for rapidly synchronizing two monotone databases using a hash tree index. The protocol is “peer to ============================================================ --- docs/Packet-I_002fO.html 235f0e3fa6b640516a179d0bbb52aa0372a6b113 +++ docs/Packet-I_002fO.html 7d822161a943e69f8067fc45e30602f382ee4f2d @@ -50,32 +50,32 @@ data items around manually. data items around manually.
-
mtn automate packets_for_certs id
+
mtn automate packets_for_certs id
This command prints out an rcert packet for each cert in your database associated with id. These can be used to transport certificates safely between monotone databases. See Automation for details of this command. -
mtn automate packet_for_fdata id
mtn automate packet_for_rdata id
+
mtn automate packet_for_fdata id
mtn automate packet_for_rdata id
These commands print out an fdata or rdata packet for the file, manifest or revision id in your database. These can be used to transport files or revisions, in their entirety, safely between monotone databases. See Automation for details of these commands. -
mtn automate packet_for_fdelta id1 id2
+
mtn automate packet_for_fdelta id1 id2
This command prints out an fdelta packet for the differences between file versions id1 and id2, in your database. These can be used to transport file differences safely between monotone databases. See Automation for details of this command. -
mtn privkey keyid
mtn pubkey keyid
+
mtn privkey keyid
mtn pubkey keyid
These commands print out an keypair or pubkey packet for the rsa key keyid. These can be used to transport public or private keys safely between monotone databases. -
mtn read
mtn read file1 file2...
+
mtn read
mtn read file1 file2...
This command reads packets from files or stdin and stores them in your database. ============================================================ --- docs/RCS.html 9517dadad84adae40f160e0c4731ffb2096794b4 +++ docs/RCS.html 518c65ee9e2622156fcd068e1d44514bb09ac41d @@ -33,14 +33,14 @@ Up: 5.10 RCS
-
mtn rcs_import filename...
+
mtn rcs_import filename...
This command imports all the file versions in each RCS file listed in filename.... These files should be raw RCS files, ending in ,v. Monotone parses them directly and inserts them into your database. Note that this does not do any revision reconstruction, and is only useful for debugging. -
mtn cvs_import pathname
+
mtn cvs_import pathname
This command imports all the file versions in each RCS file found in the tree of files starting at pathname, then reconstructs the tree-wide history of logical changes by comparing RCS time stamps and ============================================================ --- docs/Reserved-Certs.html 9ef20b2c71a46c8555dc24861a2832695a52c012 +++ docs/Reserved-Certs.html 7b2a14f984ee84b8740915b9480b72c750758579 @@ -85,7 +85,7 @@ used as a way of selecting the revision
tag
This cert's value is a symbolic name given to a revision, which may be used as a way of selecting the revision by name for later commands like -checkout and diff. +checkout, log or diff.
testresult
This cert's value is interpreted as a boolean string, either 0 or 1. It is generated by the testresult command and ============================================================ --- docs/Restrictions.html e7e3fdd0b519d88bbf47a1c5ff994af4b58a755c +++ docs/Restrictions.html 452d413cdd9ca3b1fb4c7351d42a92e41a2588c4 @@ -116,9 +116,9 @@ if no _MTN_MTN directory can be found. -

The checkout and setup commands create a new -workspace and initialize a new _MTN/options file based on their -current option settings. +

The checkout, clone and setup commands +create a new workspace and initialize a new _MTN/options +file based on their current option settings. ============================================================ --- docs/Tree.html d5ba1f479bac24dab886da9e837baf5d3b02a44d +++ docs/Tree.html b557ca7b886640909179345fba5187d52d49b94f @@ -78,7 +78,16 @@ occur. must provide a branchname; monotone will attempt to infer id as the unique head of branchname if it exists. -

mtn disapprove id
+
mtn clone --branch=branchname address directory
+The clone command is a helper command that performs the roles of a +number of other commands all at once. Firstly, it constructs a new +database. It then populates this database by pulling any data +in the branch branchname from the remote database, address. +Finally, it copies the files out of the newly created database into a +local directory, just as checkout would. The created +database is placed in the new workspace as directory/_MTN/mtn.db. + +
mtn disapprove id
This command records a disapproval of the changes between id's ancestor and id. It does this by committing the inverse changes as a new revision descending from id. The new revision @@ -93,7 +102,7 @@ worked out how to generate such a descen only works if id has exactly one ancestor, since it hasn't been worked out how to generate such a descendant in the multi-ancestor case. -
mtn heads --branch=branchname
This command lists the “heads” of branchname. +
mtn heads --branch=branchname
This command lists the “heads” of branchname.

The “heads” of a branch is the set of revisions which are members of the branch, but which have no descendants. These revisions are @@ -102,7 +111,7 @@ computer clocks is not reliable, so mono not be the newest revisions, in terms of time, but synchronization of computer clocks is not reliable, so monotone usually ignores time. -

mtn merge [--branch=branchname]
This command merges the “heads” of branchname, if there are +
mtn merge [--branch=branchname]
This command merges the “heads” of branchname, if there are multiple heads, and commits the results to the database, marking the resulting merged revision as a member of branchname. The merged revision will contain each of the head revision IDs as ancestors. @@ -113,7 +122,7 @@ the result of each previous merge as an algorithm. The process then repeats for each additional head, using the result of each previous merge as an input to the next. -
mtn propagate sourcebranch destbranch
This command takes a unique head from sourcebranch and merges it +
mtn propagate sourcebranch destbranch
This command takes a unique head from sourcebranch and merges it with a unique head of destbranch, using the least common ancestor of the two heads for a 3-way merge. The resulting revision is committed to destbranch. If @@ -128,7 +137,7 @@ development of a single module within a branches, public contribution branches, or branches devoted to the development of a single module within a larger project. -
mtn explicit_merge id id destbranch
This command merges exactly the two ids you give it, and places +
mtn explicit_merge id id destbranch
This command merges exactly the two ids you give it, and places the result in branch destbranch. It is useful when you need more control over the merging process than propagate or merge give you. For instance, if you have a branch with three heads, and you @@ -136,7 +145,7 @@ another branch, again, you can use this have a branch with two heads, and you want to propagate one of them to another branch, again, you can use this command. -
mtn merge_into_dir sourcebranch destbranch dir
This command takes a unique head from sourcebranch and merges it +
mtn merge_into_dir sourcebranch destbranch dir
This command takes a unique head from sourcebranch and merges it into a unique head of destbranch, as a directory. The resulting revision is committed to destbranch. If either sourcebranch or destbranch has multiple heads, merge_into_dir aborts, doing @@ -154,7 +163,7 @@ intended. originally in sourcebranch, which is almost certainly not what would be intended. -
mtn import --branch=branch [--message=message] [--dry-run] dir
mtn import --revision=revision [--message=message] [--dry-run] dir
This command imports the contents of the given directory and commits it +
mtn import --branch=branch [--message=message] [--dry-run] dir
mtn import --revision=revision [--message=message] [--dry-run] dir
This command imports the contents of the given directory and commits it to the head of the given branch or as a child of the given revision (and consequently into the branch that revision resides in). ============================================================ --- docs/Workspace.html e99335ca826ea34a52d72e32467e0152a7c4767c +++ docs/Workspace.html ebe5af40895414d95ec558500a321add67c6a97e @@ -35,7 +35,7 @@ Up: 5.2 Workspace
-
mtn setup [directory]
This command prepares directory as a monotone workspace, +
mtn setup [directory]
This command prepares directory as a monotone workspace, by creating and populating the _MTN directory with basic information. This information must include at least the branch and the database to be used, both of which will be placed in the @@ -46,7 +46,7 @@ directory is used. mtn commit. If no directory is specified, the current directory is used. -
mtn add pathname...
mtn add --unknown
This command places “add” entries for the paths specified in +
mtn add pathname...
mtn add --unknown
This command places “add” entries for the paths specified in pathname... in the workspace's “work list”. The work list of your workspace is stored in _MTN/revision, and is a list of explicit pathname changes you wish to commit at some future time, such @@ -62,14 +62,15 @@ any added entries inserted in its manife which it will then commit to the database. The new revision will have any added entries inserted in its manifest. -
mtn [--no-respect-ignore] mkdir directory...
This command creates a directory in the filesystem relative to your +
mtn [--no-respect-ignore] mkdir directory...
This command creates a directory in the filesystem relative to your current location and adds it to your workspace's “work list”. The changes are not reflected in your database until such time as you perform a commit. If you use the --no-respect-ignore flag, entries in .mtn-ignore will not be honored. -
mtn [--execute] drop pathname...
mtn drop --missing
This command places “drop” entries for the paths specified in -pathname... in the workspace's “work list”. The work list of +
mtn [--bookkeep-only] drop pathname...
mtn drop --missing
This command places “drop” entries for the paths specified in +pathname... in the workspace's “work list” and deletes +the file from the workspace. The work list of your workspace is stored in _MTN/revision, and is a list of explicit pathname changes you wish to commit at some future time, such as addition, removal, or renaming of files. This command also removes @@ -85,36 +86,23 @@ any dropped entries removed from its man which it will then commit to the database. The new revision will have any dropped entries removed from its manifest. -

Currently this command does not actually delete the file -src in your filesystem; if you want to actually delete the file, -you should run drop, and then perform the actual delete using -whatever mechanism you normally use to delete files. +

There are situations in which drop will tell monotone +to remove the file from the revision at commit time, but where it will +not to remove the file from the workspace immediately. One +is if the --bookkeep-only option is supplied. Another is +if a file has un-committed changes or if a directory is not empty. -

The option --execute will make “drop” perform the actual -deletion operations in the filesystem. It will ignore files or -directories which have already been deleted. - -

mtn [--execute] rename src dst
mtn [--execute] mv src dst
mtn [--execute] rename src1 ... dst/
mtn [--execute] mv src1 ... dst/
This command places “rename” entries for the p aths specified in +
mtn [--bookkeep-only] rename src dst
mtn [--bookkeep-only] mv src dst
mtn [--bookkeep-only] rename src1 ... dst/
mtn [--bookkeep-only] mv src1 ... dst/
This command places “rename” entries for the paths specified in src and dst in the workspace's “work list”. The second form renames a number of source paths to the given destination. The work list of your workspace is stored in _MTN/revision, and is a list of explicit pathname changes you wish to commit at some future time, such as addition, removal, or renaming of files. This command also moves any attributes on src to dst; see File Attributes for more -details. +details, and, unless the --bookkeep-only option is supplied, it +will rename the files immediately in the filesystem. -

While this command places a “rename” entry on your work list, it -does not immediately affect your database. When you commit -your workspace, monotone will use the work list to build a new -revision, which it will then commit to the database. The new revision -will have any renamed entries in its manifest adjusted to their new -names. - -

The option --execute will make “rename” perform the actual -rename operations in the filesystem. It will ignore missing source files -and will not overwrite existing destination files. - -

mtn commit
mtn ci
mtn commit --message=logmsg [--message=logmsg...]
mtn ci --message=logmsg [--message=logmsg...]
mtn commit --message-file=logfile
mtn ci --message-file=logfile
mtn commit pathname...
mtn ci pathname...
mtn commit --message=logmsg [--message=logmsg...] pathname...
mtn ci --message=logmsg [--message=logmsg...] pathname...
mtn commit --message-file=logfile pathname...
mtn ci --message-file=logfile pathname...
+
mtn commit
mtn ci
mtn commit --message=logmsg [--message=logmsg...]
mtn ci --message=logmsg [--message=logmsg...]
mtn commit --message-file=logfile
mtn ci --message-file=logfile
mtn commit pathname...
mtn ci pathname...
mtn commit --message=logmsg [--message=logmsg...] pathname...
mtn ci --message=logmsg [--message=logmsg...] pathname...
mtn commit --message-file=logfile pathname...
mtn ci --message-file=logfile pathname...
This command looks at your workspace, decides which files have changed, and saves the changes to your database. It does this by loading the revision named in _MTN/revision, locating the base @@ -191,7 +179,7 @@ and/or review your log message for the c and/or review your log message for the change. -
mtn revert pathname...
mtn revert --missing pathname...
This command changes your workspace, so that changes you have made +
mtn revert pathname...
mtn revert --missing pathname...
This command changes your workspace, so that changes you have made since the last checkout or update are discarded. The command is restricted the set of files or directories given as arguments. To revert the entire workspace, use revert "." in the @@ -203,7 +191,7 @@ file or directory arguments are reverted deleted from the workspace. Only missing files matching the given file or directory arguments are reverted. -
mtn update
mtn update --revision=revision
Without a --revision argument, this command incorporates +
mtn update
mtn update --revision=revision
Without a --revision argument, this command incorporates “recent” changes found in your database into your workspace. It does this by performing 3 separate stages. If any of these stages fails, the update aborts, doing nothing. The stages are: @@ -241,7 +229,7 @@ specify an explicit update, it is sometimes possible for Workspace Collisions to occur. -
mtn pluck --revision=to
mtn pluck --revision=from --revision=to
+
mtn pluck --revision=to
mtn pluck --revision=from --revision=to
This command takes changes made at any point in history, and attempts to edit your current workspace to include those changes. The end result is identical to running mtn diff -r from @@ -276,13 +264,13 @@ reduce your need for pluck, it is sometimes possible for Workspace Collisions to occur. -
mtn refresh_inodeprints
This command puts the current workspace into Inodeprints mode, +
mtn refresh_inodeprints
This command puts the current workspace into Inodeprints mode, if it was not already, and forces a full inodeprints cache refresh. After running this command, you are guaranteed that your workspace is in inodeprints mode, and that the inodeprints cache is accurate and up to date. -
mtn pivot_root [--execute] pivot_root new_root put_old
Most users will never need this command. It is primarily useful in +
mtn pivot_root [--bookkeep-only] pivot_root new_root put_old
Most users will never need this command. It is primarily useful in certain tricky cases where one wishes to combine several projects into one, or split one project into several. See also merge_into_dir. @@ -303,8 +291,9 @@ updates. exactly like two renames, including with respect to merges and updates. -

The use of --execute with this command is strongly -recommended, though not required. +

The use of --bookkeep-only with this command is not +recommended. It causes the changes to be made in monotone's +records, but not in the filesystem itself.

When running pivot_root, it is sometimes possible for Workspace Collisions to occur. ============================================================ --- monotone.html 4b704e17b4d31d163d258b64ac7285228a1fcc61 +++ monotone.html 4e9e012e2b104ab7dfdfd0a5139b569dab279721 @@ -763,8 +763,35 @@ to re-enter his passphrase in order to p address@hidden, so it indicates that Jim's key-pair has been successfully generated and stored. On subsequent commands, Jim will need to re-enter his passphrase in order to perform security-sensitive -tasks. Jim isn't very worried about security (and, more importantly, it -simplifies the tutorial text to skip the passphrase prompts) so he +tasks. + +

Pretty soon Jim gets annoyed when he has to enter his passphrase every +time he invokes mtn (and, more importantly, it simplifies the +tutorial text to skip the passphrase prompts) so he decides to use +ssh-agent to store his key. He does this by using the +ssh_agent_export command to export his key into a format that +ssh-agent can understand and adding it with ssh-add. + +

     $ mtn ssh_agent_export ~/.ssh/id_monotone
+     enter passphrase for key ID address@hidden:
+     enter new passphrase for key ID address@hidden:
+     confirm passphrase for key ID address@hidden:
+     $ chmod 600 ~/.ssh/id_monotone
+
+

From now on, Jim just needs to add his key to ssh-agent when he logs in +and he will not need to enter his passphrase every time he uses monotone. + +

     $ ssh-agent /bin/bash
+     $ ssh-add ~/.ssh/id_monotone
+     Enter passphrase for /home/user/.ssh/id_monotone:
+     Identity added: /home/user/.ssh/id_monotone (/home/user/.ssh/id_monotone)
+     $ mtn ci -m"Changed foo to bar"
+     $ mtn push
+
+

The following procedure is deprecated and not suggested for general use +as it is very insecure. + +

Jim isn't very worried about security so he decides to store his passphrase in his monotonerc file. He does this by writing a hook function which returns the passphrase: @@ -2109,9 +2136,9 @@ if no _MTN_MTN directory can be found. -

The checkout and setup commands create a new -workspace and initialize a new _MTN/options file based on their -current option settings. +

The checkout, clone and setup commands +create a new workspace and initialize a new _MTN/options +file based on their current option settings.

@@ -2511,7 +2538,7 @@ used as a way of selecting the revision

tag
This cert's value is a symbolic name given to a revision, which may be used as a way of selecting the revision by name for later commands like -checkout and diff. +checkout, log or diff.
testresult
This cert's value is interpreted as a boolean string, either 0 or 1. It is generated by the testresult command and @@ -3052,9 +3079,8 @@ Directories are created as needed, and e


Monotone does not require that you erase a file from the workspace -before you drop it. Dropping a file merely removes its entry in the -manifest of the current revision unless you give it the --execute -flag, which tells monotone to go ahead and also remove it from the filesystem. +before you drop it. Dropping a file both removes its entry in the +manifest of the current revision and removes it from the filesystem.

Viewing History

@@ -3158,7 +3184,16 @@ occur. must provide a branchname; monotone will attempt to infer id as the unique head of branchname if it exists. -
mtn disapprove id
+
mtn clone --branch=branchname address directory
+The clone command is a helper command that performs the roles of a +number of other commands all at once. Firstly, it constructs a new +database. It then populates this database by pulling any data +in the branch branchname from the remote database, address. +Finally, it copies the files out of the newly created database into a +local directory, just as checkout would. The created +database is placed in the new workspace as directory/_MTN/mtn.db. + +
mtn disapprove id
This command records a disapproval of the changes between id's ancestor and id. It does this by committing the inverse changes as a new revision descending from id. The new revision @@ -3173,7 +3208,7 @@ worked out how to generate such a descen only works if id has exactly one ancestor, since it hasn't been worked out how to generate such a descendant in the multi-ancestor case. -
mtn heads --branch=branchname
This command lists the “heads” of branchname. +
mtn heads --branch=branchname
This command lists the “heads” of branchname.

The “heads” of a branch is the set of revisions which are members of the branch, but which have no descendants. These revisions are @@ -3182,7 +3217,7 @@ computer clocks is not reliable, so mono not be the newest revisions, in terms of time, but synchronization of computer clocks is not reliable, so monotone usually ignores time. -

mtn merge [--branch=branchname]
This command merges the “heads” of branchname, if there are +
mtn merge [--branch=branchname]
This command merges the “heads” of branchname, if there are multiple heads, and commits the results to the database, marking the resulting merged revision as a member of branchname. The merged revision will contain each of the head revision IDs as ancestors. @@ -3193,7 +3228,7 @@ the result of each previous merge as an algorithm. The process then repeats for each additional head, using the result of each previous merge as an input to the next. -
mtn propagate sourcebranch destbranch
This command takes a unique head from sourcebranch and merges it +
mtn propagate sourcebranch destbranch
This command takes a unique head from sourcebranch and merges it with a unique head of destbranch, using the least common ancestor of the two heads for a 3-way merge. The resulting revision is committed to destbranch. If @@ -3208,7 +3243,7 @@ development of a single module within a branches, public contribution branches, or branches devoted to the development of a single module within a larger project. -
mtn explicit_merge id id destbranch
This command merges exactly the two ids you give it, and places +
mtn explicit_merge id id destbranch
This command merges exactly the two ids you give it, and places the result in branch destbranch. It is useful when you need more control over the merging process than propagate or merge give you. For instance, if you have a branch with three heads, and you @@ -3216,7 +3251,7 @@ another branch, again, you can use this have a branch with two heads, and you want to propagate one of them to another branch, again, you can use this command. -
mtn merge_into_dir sourcebranch destbranch dir
This command takes a unique head from sourcebranch and merges it +
mtn merge_into_dir sourcebranch destbranch dir
This command takes a unique head from sourcebranch and merges it into a unique head of destbranch, as a directory. The resulting revision is committed to destbranch. If either sourcebranch or destbranch has multiple heads, merge_into_dir aborts, doing @@ -3234,7 +3269,7 @@ intended. originally in sourcebranch, which is almost certainly not what would be intended. -
mtn import --branch=branch [--message=message] [--dry-run] dir
mtn import --revision=revision [--message=message] [--dry-run] dir
This command imports the contents of the given directory and commits it +
mtn import --branch=branch [--message=message] [--dry-run] dir
mtn import --revision=revision [--message=message] [--dry-run] dir
This command imports the contents of the given directory and commits it to the head of the given branch or as a child of the given revision (and consequently into the branch that revision resides in). @@ -3250,7 +3285,7 @@ files are added before committing.

5.2 Workspace

-
mtn setup [directory]
This command prepares directory as a monotone workspace, +
mtn setup [directory]
This command prepares directory as a monotone workspace, by creating and populating the _MTN directory with basic information. This information must include at least the branch and the database to be used, both of which will be placed in the @@ -3261,7 +3296,7 @@ directory is used. mtn commit. If no directory is specified, the current directory is used. -
mtn add pathname...
mtn add --unknown
This command places “add” entries for the paths specified in +
mtn add pathname...
mtn add --unknown
This command places “add” entries for the paths specified in pathname... in the workspace's “work list”. The work list of your workspace is stored in _MTN/revision, and is a list of explicit pathname changes you wish to commit at some future time, such @@ -3277,14 +3312,15 @@ any added entries inserted in its manife which it will then commit to the database. The new revision will have any added entries inserted in its manifest. -
mtn [--no-respect-ignore] mkdir directory...
This command creates a directory in the filesystem relative to your +
mtn [--no-respect-ignore] mkdir directory...
This command creates a directory in the filesystem relative to your current location and adds it to your workspace's “work list”. The changes are not reflected in your database until such time as you perform a commit. If you use the --no-respect-ignore flag, entries in .mtn-ignore will not be honored. -
mtn [--execute] drop pathname...
mtn drop --missing
This command places “drop” entries for the paths specified in -pathname... in the workspace's “work list”. The work list of +
mtn [--bookkeep-only] drop pathname...
mtn drop --missing
This command places “drop” entries for the paths specified in +pathname... in the workspace's “work list” and deletes +the file from the workspace. The work list of your workspace is stored in _MTN/revision, and is a list of explicit pathname changes you wish to commit at some future time, such as addition, removal, or renaming of files. This command also removes @@ -3300,36 +3336,23 @@ any dropped entries removed from its man which it will then commit to the database. The new revision will have any dropped entries removed from its manifest. -

Currently this command does not actually delete the file -src in your filesystem; if you want to actually delete the file, -you should run drop, and then perform the actual delete using -whatever mechanism you normally use to delete files. +

There are situations in which drop will tell monotone +to remove the file from the revision at commit time, but where it will +not to remove the file from the workspace immediately. One +is if the --bookkeep-only option is supplied. Another is +if a file has un-committed changes or if a directory is not empty. -

The option --execute will make “drop” perform the actual -deletion operations in the filesystem. It will ignore files or -directories which have already been deleted. - -

mtn [--execute] rename src dst
mtn [--execute] mv src dst
mtn [--execute] rename src1 ... dst/
mtn [--execute] mv src1 ... dst/
This command places “rename” entries for the p aths specified in +
mtn [--bookkeep-only] rename src dst
mtn [--bookkeep-only] mv src dst
mtn [--bookkeep-only] rename src1 ... dst/
mtn [--bookkeep-only] mv src1 ... dst/
This command places “rename” entries for the paths specified in src and dst in the workspace's “work list”. The second form renames a number of source paths to the given destination. The work list of your workspace is stored in _MTN/revision, and is a list of explicit pathname changes you wish to commit at some future time, such as addition, removal, or renaming of files. This command also moves any attributes on src to dst; see File Attributes for more -details. +details, and, unless the --bookkeep-only option is supplied, it +will rename the files immediately in the filesystem. -

While this command places a “rename” entry on your work list, it -does not immediately affect your database. When you commit -your workspace, monotone will use the work list to build a new -revision, which it will then commit to the database. The new revision -will have any renamed entries in its manifest adjusted to their new -names. - -

The option --execute will make “rename” perform the actual -rename operations in the filesystem. It will ignore missing source files -and will not overwrite existing destination files. - -

mtn commit
mtn ci
mtn commit --message=logmsg [--message=logmsg...]
mtn ci --message=logmsg [--message=logmsg...]
mtn commit --message-file=logfile
mtn ci --message-file=logfile
mtn commit pathname...
mtn ci pathname...
mtn commit --message=logmsg [--message=logmsg...] pathname...
mtn ci --message=logmsg [--message=logmsg...] pathname...
mtn commit --message-file=logfile pathname...
mtn ci --message-file=logfile pathname...
+
mtn commit
mtn ci
mtn commit --message=logmsg [--message=logmsg...]
mtn ci --message=logmsg [--message=logmsg...]
mtn commit --message-file=logfile
mtn ci --message-file=logfile
mtn commit pathname...
mtn ci pathname...
mtn commit --message=logmsg [--message=logmsg...] pathname...
mtn ci --message=logmsg [--message=logmsg...] pathname...
mtn commit --message-file=logfile pathname...
mtn ci --message-file=logfile pathname...
This command looks at your workspace, decides which files have changed, and saves the changes to your database. It does this by loading the revision named in _MTN/revision, locating the base @@ -3406,7 +3429,7 @@ and/or review your log message for the c and/or review your log message for the change. -
mtn revert pathname...
mtn revert --missing pathname...
This command changes your workspace, so that changes you have made +
mtn revert pathname...
mtn revert --missing pathname...
This command changes your workspace, so that changes you have made since the last checkout or update are discarded. The command is restricted the set of files or directories given as arguments. To revert the entire workspace, use revert "." in the @@ -3418,7 +3441,7 @@ file or directory arguments are reverted deleted from the workspace. Only missing files matching the given file or directory arguments are reverted. -
mtn update
mtn update --revision=revision
Without a --revision argument, this command incorporates +
mtn update
mtn update --revision=revision
Without a --revision argument, this command incorporates “recent” changes found in your database into your workspace. It does this by performing 3 separate stages. If any of these stages fails, the update aborts, doing nothing. The stages are: @@ -3456,7 +3479,7 @@ specify an explicit update, it is sometimes possible for Workspace Collisions to occur. -
mtn pluck --revision=to
mtn pluck --revision=from --revision=to
+
mtn pluck --revision=to
mtn pluck --revision=from --revision=to
This command takes changes made at any point in history, and attempts to edit your current workspace to include those changes. The end result is identical to running mtn diff -r from @@ -3491,13 +3514,13 @@ reduce your need for pluck, it is sometimes possible for Workspace Collisions to occur. -
mtn refresh_inodeprints
This command puts the current workspace into Inodeprints mode, +
mtn refresh_inodeprints
This command puts the current workspace into Inodeprints mode, if it was not already, and forces a full inodeprints cache refresh. After running this command, you are guaranteed that your workspace is in inodeprints mode, and that the inodeprints cache is accurate and up to date. -
mtn pivot_root [--execute] pivot_root new_root put_old
Most users will never need this command. It is primarily useful in +
mtn pivot_root [--bookkeep-only] pivot_root new_root put_old
Most users will never need this command. It is primarily useful in certain tricky cases where one wishes to combine several projects into one, or split one project into several. See also merge_into_dir. @@ -3518,8 +3541,9 @@ updates. exactly like two renames, including with respect to merges and updates. -

The use of --execute with this command is strongly -recommended, though not required. +

The use of --bookkeep-only with this command is not +recommended. It causes the changes to be made in monotone's +records, but not in the filesystem itself.

When running pivot_root, it is sometimes possible for Workspace Collisions to occur. @@ -3531,7 +3555,7 @@ recommended, though not required.

5.3 Network

-
mtn serve [--bind=[address][:port]]
mtn serve --stdio [--no-transport-auth]
mtn pull [--set-default] [uri-or-address] [glob [...] [--exclude=exclude-glob]]]
mtn push [--set-default] [uri-or-address] [glob [...] [--exclude=exclude-glob]]]
mtn sync [--set-default] [uri-or-address] [glob [...] [--exclude=exclude-glob]]]
+
mtn serve [--bind=[address][:port]]
mtn serve --stdio [--no-transport-auth]
mtn pull [--set-default] [uri-or-address] [glob [...] [--exclude=exclude-glob]]]
mtn push [--set-default] [uri-or-address] [glob [...] [--exclude=exclude-glob]]]
mtn sync [--set-default] [uri-or-address] [glob [...] [--exclude=exclude-glob]]]
These commands operate the “netsync” protocol built into monotone. This is a custom protocol for rapidly synchronizing two monotone databases using a hash tree index. The protocol is “peer to @@ -3624,7 +3648,7 @@ branch name.

5.4 Informative

-
mtn status
mtn status pathname...
+
mtn status
mtn status pathname...
This command prints a description of the “status” of your workspace. In particular, it prints:
    @@ -3646,7 +3670,7 @@ changed within the current subdirectory Specifying only the pathname "." will restrict status to files changed within the current subdirectory of the workspace. -
    mtn log
    mtn log [--last=n] [--next=n] [--from=id [...]] [--to=id [...]] [--brief] [--no-merges] [--no-files] [--diffs] [file [...]]
    +
    mtn log
    mtn log [--last=n] [--next=n] [--from=id [...]] [--to=id [...]] [--brief] [--no-merges] [--no-files] [--diffs] [file [...]]
    This command prints out a log, in reverse-ancestry order, of small history summaries. Each summary contains author, date, changelog and comment information associated with a revision. @@ -3685,7 +3709,7 @@ where those files are changed.

    If one or more files are given, the command will only log the revisions where those files are changed. -

    mtn annotate file
    mtn annotate [--revision=id] [--brief] file
    +
    mtn annotate file
    mtn annotate [--revision=id] [--brief] file
    Dumps an annotated copy of the file to stdout. In the absence of the --brief flag, each line of the file is translated to <revision id>: <line> in the output, where <revision id> @@ -3697,7 +3721,7 @@ character and the date field is truncate author cert value is truncated at the first @ or space character and the date field is truncated to remove the time of day. -
    mtn complete file partial-id
    mtn complete [--brief] key partial-id
    mtn complete [--brief] revision partial-id
    +
    mtn complete file partial-id
    mtn complete [--brief] key partial-id
    mtn complete [--brief] revision partial-id
    These commands print out all known completions of a partial sha1 value, listing completions which are file, manifest or revision IDs depending on which variant is used. For @@ -3723,7 +3747,7 @@ present users with additional informatio 01f992577bd8bcdcade0f89e724fd5dc2d2bbe8a address@hidden 2005-05-11T05:19:29 01faad191d8d0474777c70b4d606782942333a78 address@hidden 2005-04-11T04:24:01 -
    mtn diff [--unified] [--show-encloser]
    mtn diff --context [--show-encloser]
    mtn diff --external [--diff-args=argstring]
    mtn diff pathname...
    mtn diff --revision=id
    mtn diff --revision=id pathname...
    mtn diff --revision=id1 --revision=id2
    mtn diff --revision=id1 --revision=id2 pathname...
    +
    mtn diff [--unified] [--show-encloser]
    mtn diff --context [--show-encloser]
    mtn diff --external [--diff-args=argstring]
    mtn diff pathname...
    mtn diff --revision=id
    mtn diff --revision=id pathname...
    mtn diff --revision=id1 --revision=id2
    mtn diff --revision=id1 --revision=id2 pathname...
    These commands print out GNU “unified diff format” textual difference listings between various manifest versions. With no --revision options, diff will print the differences between the @@ -3787,7 +3811,7 @@ passed to it, and so on, are controlled passed to it, and so on, are controlled by the hook external_diff; see Hooks for more details. -
    mtn list certs id
    mtn ls certs id
    +
    mtn list certs id
    mtn ls certs id
    These commands will print out a list of certificates associated with a particular revision id. Each line of the print out will indicate: @@ -3834,24 +3858,24 @@ branch: : * testsuite.at: Call t_cross.at. : -
    mtn list keys
    mtn ls keys
    mtn list keys pattern
    mtn ls keys pattern
    These commands list rsa keys held in your keystore and current database. +
    mtn list keys
    mtn ls keys
    mtn list keys pattern
    mtn ls keys pattern
    These commands list rsa keys held in your keystore and current database. They do not print out any cryptographic information; they simply list the names of public and private keys you have on hand.

    If pattern is provided, it is used as a glob to limit the keys listed. Otherwise all keys in your database are listed. -

    mtn list branches
    mtn ls branches
    +
    mtn list branches
    mtn ls branches
    This command lists all known branches in your database. -
    mtn list tags
    mtn ls tags
    +
    mtn list tags
    mtn ls tags
    This command lists all known tags in your database. -
    mtn list vars
    mtn ls vars
    mtn list vars domain
    mtn ls vars domain
    +
    mtn list vars
    mtn ls vars
    mtn list vars domain
    mtn ls vars domain
    This command lists all vars in your database, or all vars within a given domain. See Vars for more information. -
    mtn list known
    mtn ls known
    mtn list known pathname...
    mtn ls known pathname...
    +
    mtn list known
    mtn ls known
    mtn list known pathname...
    mtn ls known pathname...
    This command lists all files which would become part of the manifest of the next revision if you committed your workspace at this point. @@ -3864,7 +3888,7 @@ files to the current subdirectory of the Specifying only the pathname "." will restrict the search for known files to the current subdirectory of the workspace. -
    mtn list unknown
    mtn ls unknown
    mtn list unknown pathname...
    mtn ls unknown pathname...
    +
    mtn list unknown
    mtn ls unknown
    mtn list unknown pathname...
    mtn ls unknown pathname...
    This command lists all files in your workspace that monotone is either ignoring or knows nothing about. @@ -3877,7 +3901,7 @@ files to the current subdirectory of the Specifying only the pathname "." will restrict the search for unknown files to the current subdirectory of the workspace. -
    mtn list ignored
    mtn ls ignored
    mtn list ignored pathname...
    mtn ls ignored pathname...
    +
    mtn list ignored
    mtn ls ignored
    mtn list ignored pathname...
    mtn ls ignored pathname...
    This command lists all files in your workspace that monotone is intentionally ignoring, due to the results of the ignore_file (filename) hook. @@ -3891,7 +3915,7 @@ files to the current subdirectory of the Specifying only the pathname "." will restrict the search for ignored files to the current subdirectory of the workspace. -
    mtn list missing
    mtn ls missing
    mtn list missing pathname...
    mtn ls missing pathname...
    +
    mtn list missing
    mtn ls missing
    mtn list missing pathname...
    mtn ls missing pathname...
    This command lists all files in your workspace's base manifest, which are not present in the workspace. @@ -3904,7 +3928,7 @@ files to the current subdirectory of the Specifying only the pathname "." will restrict the search for missing files to the current subdirectory of the workspace. -
    mtn list changed
    mtn ls changed
    mtn list changed pathname...
    mtn ls changed pathname...
    +
    mtn list changed
    mtn ls changed
    mtn list changed pathname...
    mtn ls changed pathname...
    This command lists all files in your workspace that have changed compared to the base revision, including files that are dropped, added or renamed. @@ -3918,7 +3942,7 @@ files to the current subdirectory of the Specifying only the pathname "." will restrict the search for known files to the current subdirectory of the workspace. -
    mtn show_conflicts rev rev
    +
    mtn show_conflicts rev rev
    This command shows what conflicts would need to be resolved in order to merge the given revisions.
@@ -3928,7 +3952,7 @@ the given revisions.

5.5 Key and Cert Trust

-
mtn genkey keyid
+
mtn genkey keyid
This command generates an rsa public/private key pair, using a system random number generator, and stores it in your keystore under the key name keyid. @@ -3944,17 +3968,17 @@ careful using this hook. increases the risk of a key compromise on your local computer. Be careful using this hook. -
mtn dropkey keyid
+
mtn dropkey keyid
This command drops the public and/or private key. If both exist, both are dropped, if only one exists, it is dropped. This command should be used with caution as changes are irreversible without a backup of the key(s) that were dropped. -
mtn chkeypass id
+
mtn passphrase id
This command lets you change the passphrase of the private half of the key id. -
mtn trusted id certname certval signers
+
mtn trusted id certname certval signers
This command lets you test your revision trust hook get_revision_cert_trust (see Hook Reference). You pass it a revision ID, a certificate name, a certificate value, and one or more @@ -3962,6 +3986,37 @@ those keys. Monotone would trust a cert on that revision with that value signed by those keys. +
mtn ssh_agent_export filename
+This command will export your private key in a format that ssh-agent +can read (PKCS8, PEM). You will be asked for your current key's password +and a new password to encrypt the key with. The key will be printed to +stdout. Once you have put this key in a file simply add it to ssh-agent +and you will only have to enter your key password once as ssh-agent +will cache the key for you. + +
          $ mtn ssh_agent_export ~/.ssh/id_monotone
+          enter passphrase for key ID address@hidden:
+          enter new passphrase for key ID address@hidden:
+          confirm passphrase for key ID address@hidden:
+          $ chmod 600 ~/.ssh/id_monotone
+          $ ssh-agent /bin/bash
+          $ ssh-add ~/.ssh/id_monotone
+          Enter passphrase for /home/user/.ssh/id_monotone:
+          Identity added: /home/user/.ssh/id_monotone (/home/user/.ssh/id_monotone)
+          $ mtn ci -m"Changed foo to bar"
+          $ mtn push
+     
+

You can also use the --ssh-sign option to control whether ssh-agent will +be used for signing. If set to yes, ssh-agent will be used to sign. If your +key has not been added to ssh-agent monotone will fall back to its internal signing +code and ask you for your password. If set to only, monotone will sign only +with ssh-agent. If set to no, monotone will always use its internal signing +code even if ssh-agent is running and has your monotone key loaded. If set to +check, monotone will sign with both ssh-agent (if your key is loaded into +it) and monotone's internal signing code, then compare the results. check +will be removed at some future time as it is meant only for testing and will not +work with all signing algorithms. +

@@ -3969,7 +4024,7 @@ those keys.

5.6 Certificate

-
mtn cert id certname
mtn cert id certname certval
+
mtn cert id certname
mtn cert id certname certval
These commands create a new certificate with name certname, for a revision with version id. The id argument can be a selector using certs already on the revision, such as h:branchname. @@ -3977,18 +4032,18 @@ Otherwise the certificate value is read

If certval is provided, it is the value of the certificate. Otherwise the certificate value is read from stdin. -

mtn approve id
+
mtn approve id
This command is a synonym for mtn cert id branch branchname where branchname is the current branch name (either deduced from the workspace or from the --branch option). -
mtn comment id
mtn comment id comment
+
mtn comment id
mtn comment id comment
These commands are synonyms for mtn cert id comment comment. If comment is not provided, it is read from stdin. -
mtn tag id tagname
+
mtn tag id tagname
This command associates the symbolic name tagname with the revision id, so that symbolic name can later be used in Selectors for specifying revisions for commands like @@ -3997,7 +4052,7 @@ revision id, so that symbolic

This command is a synonym for mtn cert id tag tagname. -

mtn testresult id 0
mtn testresult id 1
+
mtn testresult id 0
mtn testresult id 1
These commands are synonyms for mtn cert id testresult 0 or mtn cert id testresult 1. @@ -4023,32 +4078,32 @@ data items around manually. data items around manually.
-
mtn automate packets_for_certs id
+
mtn automate packets_for_certs id
This command prints out an rcert packet for each cert in your database associated with id. These can be used to transport certificates safely between monotone databases. See Automation for details of this command. -
mtn automate packet_for_fdata id
mtn automate packet_for_rdata id
+
mtn automate packet_for_fdata id
mtn automate packet_for_rdata id
These commands print out an fdata or rdata packet for the file, manifest or revision id in your database. These can be used to transport files or revisions, in their entirety, safely between monotone databases. See Automation for details of these commands. -
mtn automate packet_for_fdelta id1 id2
+
mtn automate packet_for_fdelta id1 id2
This command prints out an fdelta packet for the differences between file versions id1 and id2, in your database. These can be used to transport file differences safely between monotone databases. See Automation for details of this command. -
mtn privkey keyid
mtn pubkey keyid
+
mtn privkey keyid
mtn pubkey keyid
These commands print out an keypair or pubkey packet for the rsa key keyid. These can be used to transport public or private keys safely between monotone databases. -
mtn read
mtn read file1 file2...
+
mtn read
mtn read file1 file2...
This command reads packets from files or stdin and stores them in your database. @@ -4059,33 +4114,33 @@ in your database.

5.8 Database

-
mtn set domain name value
+
mtn set domain name value
Associates the value value to name in domain domain. See Vars for more information. -
mtn unset domain name
+
mtn unset domain name
Deletes any value associated with name in domain. See Vars for more information. -
mtn db init --db=dbfile
+
mtn db init --db=dbfile
This command initializes a new monotone database at dbfile. -
mtn db info --db=dbfile
+
mtn db info --db=dbfile
This command prints information about the monotone database dbfile, including its schema version and various table size statistics. -
mtn db version --db=dbfile
+
mtn db version --db=dbfile
This command prints out just the schema version of the monotone database dbfile. -
mtn db dump --db=dbfile
+
mtn db dump --db=dbfile
This command dumps an SQL statement representing the entire state of dbfile to the standard output stream. It is a very low-level command, and produces the most “recoverable” dumps of your database possible. It is sometimes also useful when migrating databases between variants of the underlying SQLite database format. -
mtn db load --db=dbfile
+
mtn db load --db=dbfile
This command applies a raw SQL statement, read from the standard input stream, to the database dbfile. It is most useful when loading a database dumped with the dump command. @@ -4094,7 +4149,7 @@ database is included in the dum database is included in the dump, so you should not try to init your database before a load. -
mtn db migrate --db=dbfile
+
mtn db migrate --db=dbfile
This command attempts to migrate the database dbfile to the newest schema known by the version of monotone you are currently running. If the migration fails, no changes should be made to the @@ -4104,7 +4159,7 @@ during migration. a copy of it before migrating, in case there is an untrapped error during migration. -
mtn db check --db=dbfile
+
mtn db check --db=dbfile
Monotone always works hard to verify the data it creates and accesses. For instance, if you have hard drive problems that corrupt data in monotone's database, and you attempt to retrieve this data, then @@ -4234,7 +4289,7 @@ and revision is correct.

This command also verifies that the sha1 hash of every file, manifest, and revision is correct. -

mtn db kill_rev_locally id
+
mtn db kill_rev_locally id
This command “kills”, i.e., deletes, a given revision, as well as any certs attached to it. It has an ugly name because it is a dangerous command; it permanently and irrevocably deletes historical information @@ -4261,7 +4316,7 @@ work you can extract id's dat work you can extract id's data. -
mtn db kill_branch_certs_locally branch
+
mtn db kill_branch_certs_locally branch
This command “kills” a branch by deleting all branch certs with that branch name. You should consider carefully whether you want to use it, because it can irrevocably delete important information. It does not @@ -4275,7 +4330,7 @@ certificates locally. you sync, unless the owners of those databases also delete those certificates locally. -
mtn db kill_tag_locally tag
+
mtn db kill_tag_locally tag
This command “kills” a tag by deleting all tag certs with that tag name. You should consider carefully whether you want to use it, because it can irrevocably delete important information. It does not modify or @@ -4287,7 +4342,7 @@ certificates locally. sync, unless the owners of those databases also delete those certificates locally. -
mtn db execute sql-statement
+
mtn db execute sql-statement
This is a debugging command which executes sql-statement against your database, and prints any results of the expression in a tabular form. It can be used to investigate the state of your database, or @@ -4305,7 +4360,7 @@ messages. messages.
-
mtn automate interface_version
+
mtn automate interface_version
Arguments:
None. @@ -4334,7 +4389,7 @@ None.
-
mtn automate heads [branch]
+
mtn automate heads [branch]
Arguments:
One branch name, branch. If none is given, the current default branch is used. @@ -4361,7 +4416,7 @@ If the given branch contains no members
-
mtn automate ancestors rev1 [rev2 [...]]
+
mtn automate ancestors rev1 [rev2 [...]]
Arguments:
One or more revision IDs, rev1, rev2, etc. @@ -4394,7 +4449,7 @@ an error message to stderr, and exits wi
-
mtn automate common_ancestors rev1 [rev2 [...]]
+
mtn automate common_ancestors rev1 [rev2 [...]]
Arguments:
One or more revision IDs, rev1, rev2, etc. @@ -4427,7 +4482,7 @@ an error message to stderr, and exits wi
-
mtn automate parents rev
+
mtn automate parents rev
Arguments:
One revision ID, rev. @@ -4457,7 +4512,7 @@ stdout, prints an error message to stder
-
mtn automate descendents rev1 [rev2 [...]]
+
mtn automate descendents rev1 [rev2 [...]]
Arguments:
One or more revision IDs, rev1, rev2, etc. @@ -4490,7 +4545,7 @@ an error message to stderr, and exits wi
-
mtn automate children rev
+
mtn automate children rev
Arguments:
One revision ID, rev. @@ -4520,7 +4575,7 @@ stdout, prints an error message to stder
-
mtn automate graph
+
mtn automate graph
Arguments:
None. @@ -4557,7 +4612,7 @@ None.
-
mtn automate erase_ancestors [rev1 [rev2 [...]]]
+
mtn automate erase_ancestors [rev1 [rev2 [...]]]
Arguments:
One or more revision IDs, rev1, rev2, etc. @@ -4591,7 +4646,7 @@ an error message to stderr, and exits wi
-
mtn automate toposort [rev1 [rev2 [...]]]
+
mtn automate toposort [rev1 [rev2 [...]]]
Arguments:
One or more revision IDs, rev1, rev2, etc. @@ -4623,7 +4678,7 @@ an error message to stderr, and exits wi
-
mtn automate ancestry_difference new [old1 [old2 [...]]]
+
mtn automate ancestry_difference new [old1 [old2 [...]]]
Arguments:
A “new” revision ID new, followed by zero or more “old” @@ -4660,7 +4715,7 @@ an error message to stderr, and exits wi
-
mtn automate leaves
+
mtn automate leaves
Arguments:
None. @@ -4692,7 +4747,7 @@ None.
-
mtn automate branches
+
mtn automate branches
Arguments:
None. @@ -4719,7 +4774,7 @@ None.
-
mtn automate tags [branch_pattern]
+
mtn automate tags [branch_pattern]
Arguments:
A branch pattern (optional). @@ -4787,7 +4842,7 @@ specified.
-
mtn automate select selector
+
mtn automate select selector
Arguments:
One selector (or combined selector). @@ -4815,7 +4870,7 @@ None.
-
mtn automate inventory
+
mtn automate inventory
Arguments:
None. @@ -4946,8 +5001,8 @@ the "/" character, file paths do not end 'M' the file is missing but is included in the current manifest -

Note that there are 45 possible status code combinations, some of which -are not valid, detailed below. +

Note that out of the 45 possible status code combinations, only 26 are valid, +detailed below.

          
           '   ' unchanged
@@ -4959,25 +5014,25 @@ are not valid, detailed below.
           ' A ' added (invalid, add should have associated patch)
           ' AP' added and patched
           ' AU' added but unknown (invalid)
-          ' AI' added but ignored (seems invalid, but may be possible?)
+          ' AI' added but ignored (invalid, added files are no longer ignored)
           ' AM' added but missing from the filesystem
           
           ' R ' rename target
           ' RP' rename target and patched
           ' RU' rename target but unknown (invalid)
-          ' RI' rename target but ignored (seems invalid, but may be possible?)
+          ' RI' rename target but ignored (invalid)
           ' RM' rename target but missing from the filesystem
           
           'D  ' dropped
           'D P' dropped and patched (invalid)
           'D U' dropped and unknown (still exists on the filesystem)
-          'D I' dropped and ignored (seems invalid, but may be possible?)
+          'D I' dropped and ignored
           'D M' dropped and missing (invalid)
           
           'DA ' dropped and added (invalid, add should have associated patch)
           'DAP' dropped and added and patched
           'DAU' dropped and added but unknown (invalid)
-          'DAI' dropped and added but ignored (seems invalid, but may be possible?)
+          'DAI' dropped and added but ignored (invalid, added files are no longer ignored)
           'DAM' dropped and added but missing from the filesystem
           
           'DR ' dropped and rename target
@@ -4989,19 +5044,19 @@ are not valid, detailed below.
           'R  ' rename source
           'R P' rename source and patched (invalid)
           'R U' rename source and unknown (still exists on the filesystem)
-          'R I' rename source and ignored (seems invalid, but may be possible?)
+          'R I' rename source and ignored
           'R M' rename source and missing (invalid)
           
           'RA ' rename source and added (invalid, add should have associated patch)
           'RAP' rename source and added and patched
           'RAU' rename source and added but unknown (invalid)
-          'RAI' rename source and added but ignored (seems invalid, but may be possible?)
+          'RAI' rename source and added but ignored (invalid, added files are no longer ignored)
           'RAM' rename source and added but missing from the filesystem
           
           'RR ' rename source and target
           'RRP' rename source and target and target patched
           'RRU' rename source and target and target unknown (invalid)
-          'RRI' rename source and target and target ignored (seems invalid, but may be possible?)
+          'RRI' rename source and target and target ignored (invalid)
           'RRM' rename source and target and target missing
      
@@ -5043,7 +5098,7 @@ message to stderr, and exits with status
-
mtn automate certs id
+
mtn automate certs id
Arguments:
A revision ID id, for which any certificates will be printed. @@ -5117,7 +5172,7 @@ or invalid prints an error message to st
-
mtn automate stdio
+
mtn automate stdio
Arguments:
none @@ -5200,7 +5255,7 @@ whatever error message would have been g
-
mtn automate get_revision
mtn automate get_revision id
+
mtn automate get_revision
mtn automate get_revision id
Arguments:
Specifying the option id argument outputs the changeset @@ -5296,7 +5351,7 @@ to stderr and exits with status 1.
-
mtn automate get_base_revision_id
+
mtn automate get_base_revision_id
Arguments:
None. @@ -5322,7 +5377,7 @@ message to stderr, and exits with status
-
mtn automate get_current_revision_id
+
mtn automate get_current_revision_id
Arguments:
None. @@ -5349,7 +5404,7 @@ message to stderr, and exits with status
-
mtn automate get_manifest_of
mtn automate get_manifest_of revid
+
mtn automate get_manifest_of
mtn automate get_manifest_of revid
Arguments:
Specifying the optional revid argument outputs the manifest for the @@ -5486,7 +5541,7 @@ message to stderr and exits with status
-
mtn automate attributes file
+
mtn automate attributes file
Arguments:
The argument file determines which file's attributes should be printed. @@ -5558,7 +5613,7 @@ message to stderr and exits with status
-
mtn automate content_diff [--revision=id1 [--revision=id2]] [files ...]
+
mtn automate content_diff [--revision=id1 [--revision=id2]] [files ...]
Arguments:
One or more file arguments restrict the diff output to these files, @@ -5611,7 +5666,7 @@ restrictions can't be applied, the comma
-
mtn automate get_file id
+
mtn automate get_file id
Arguments:
The id argument specifies the file hash of the file to be output. @@ -5640,7 +5695,7 @@ to stderr and exits with status 1.
-
mtn automate get_file_of filename [--revision=id]
+
mtn automate get_file_of filename [--revision=id]
Arguments:
The filename argument specifies the filename of the file to be output. @@ -5673,7 +5728,7 @@ with status 1.
-
mtn automate get_option option
+
mtn automate get_option option
Arguments:
The option argument specifies the option name of the option to be output. @@ -5698,7 +5753,7 @@ with status 1.
-
mtn automate keys
+
mtn automate keys
Arguments:
None. @@ -5740,7 +5795,7 @@ None.
-
mtn automate packet_for_rdata id
+
mtn automate packet_for_rdata id
Arguments:
The id specifies the revision to output an rdata packet for. @@ -5772,7 +5827,7 @@ and exits with status 1.
-
mtn automate packet_for_certs id
+
mtn automate packet_for_certs id
Arguments:
The id specifies the revision to output cert packets for. @@ -5830,7 +5885,7 @@ and exits with status 1.
-
mtn automate packet_for_fdata id
+
mtn automate packet_for_fdata id
Arguments:
The id specifies the file to output an fdata packet for. @@ -5860,7 +5915,7 @@ and exits with status 1.
-
mtn automate packet_for_fdelta from-id to-id
+
mtn automate packet_for_fdelta from-id to-id
Arguments:
The from-id specifies the file to use as the base of the delta, @@ -5892,7 +5947,7 @@ message to stderr and exits with status
-
mtn automate get_content_changed id file
+
mtn automate get_content_changed id file
Arguments:
The id specifies a revision ID, from which content change calculations will be based. @@ -5924,7 +5979,7 @@ message to stderr and exits with status
-
mtn automate get_corresponding_path source_id file target_id
+
mtn automate get_corresponding_path source_id file target_id
Arguments:
The source_id specifies a revision ID in which file is current extant. @@ -5962,6 +6017,160 @@ 1. Note that file not existin
+
mtn automate db_get domain name
+
+
Arguments:
+The domain and name specify the database variable +which is returned. + +
Added in:
+4.1 + +
Purpose:
+Read a database variable, see also Vars. + +
Sample output:
+
           
+          off.net 
+     
+ +
Output format:
+Exactly the variable's content. Since this command is mainly intended for +automate stdio it will not add a trailing newline. + +
Error conditions:
+If the variable is unknown prints an error message to stderr and exits with +status 1. + +
+ +
mtn automate db_put domain name value
+
+
Arguments:
+The domain and name specify the database variable +which is changed to value. + +
Added in:
+4.1 + +
Purpose:
+Change a database variable, see also Vars. + +
Sample usage:
+
           
+          mtn automate db_set database default-server off.net 
+     
+ +
Output format:
+No output. + +
Error conditions:
+None. + +
+ +
mtn automate put_file [base-id] contents
+
+
Arguments:
+The optional base-id specifies a file-id on which the contents are +based on. This is used for delta encoding. contents are the contents of +the new file. + +
Added in:
+4.1 + +
Purpose:
+Preparation of a workspace-less commit. +See also automate put_revision. Normally used via +automate stdio. + +
Sample output:
+
           
+          70a0f283898a18815a83df37c902e5f1492e9aa2 
+     
+ +
Output format:
+The sha1 sum of the contents, hex encoded. + +
Error conditions:
+If the optional base id is unknown prints an error message to stderr and +exits with status 1. + +
+ +
mtn automate put_revision revision-data
+
+
Arguments:
+revision-data is the new revision. See example below. Note that +the new_manifest entry is ignored – put_revision will +ignore whatever you put here and calculate the correct manifest id +itself. (However, for now, you must put 40 hex digits here – it's +just that which particular digits you put are entirely irrelevant. +All zeros is a good choice.) Monotone will also canonicalize your +whitespace automatically. You do not need to worry about getting just +the right amount of indentation in front of each line. However, +everything else about your revision must be valid. + +
Added in:
+4.1 + +
Purpose:
+Workspace-less commit. Normally used via automate stdio. + +
Sample argument:
+
               format_version "1"
+               
+               new_manifest [0000000000000000000000000000000000000004]
+               
+               old_revision []
+               
+               add_dir ""
+               
+               add_file "foo"
+               content [5bf1fd927dfb8679496a2e6cf00cbe50c1c87145]
+          
+
Sample output:
+
           
+          4c2c1d846fa561601254200918fba1fd71e6795d 
+     
+ +
Output format:
+The new revision id, hex encoded. + +
Error conditions:
+If the changeset is invalid prints an error message to stderr and +exits with status 1. May abort on invalid formats. If the revision is +already present in the database, prints a message to stderr noting +this fact, but otherwise works as normal. + +
+ +
mtn automate cert revision name value
+
+
Arguments:
+revision is an existing revision, name is the certificate name +and value its value. + +
Added in:
+4.1 + +
Purpose:
+automate stdio capable variant of mtn cert. + +
Sample usage:
+
           
+          mtn automate cert 4c2c1d846fa561601254200918fba1fd71e6795d author address@hidden 
+     
+ +
Output format:
+No output. + +
Error conditions:
+If the revision is invalid prints an error message to stderr and +exits with status 1. + +
+

@@ -5969,14 +6178,14 @@ 1. Note that file not existin

5.10 RCS

-
mtn rcs_import filename...
+
mtn rcs_import filename...
This command imports all the file versions in each RCS file listed in filename.... These files should be raw RCS files, ending in ,v. Monotone parses them directly and inserts them into your database. Note that this does not do any revision reconstruction, and is only useful for debugging. -
mtn cvs_import pathname
+
mtn cvs_import pathname
This command imports all the file versions in each RCS file found in the tree of files starting at pathname, then reconstructs the tree-wide history of logical changes by comparing RCS time stamps and @@ -6055,7 +6264,7 @@ are taken. are taken.
-
note_commit (new_id, revision, certs)
+
note_commit (new_id, revision, certs)
Called by monotone after the version new_id is committed. The second parameter, revision is the text of the revision, what would be given by mtn automate get_revision new_id. The third @@ -6070,7 +6279,7 @@ should not perform any security-critical commit-notification systems such as mailing lists or news services. It should not perform any security-critical operations. -
note_netsync_start (session_id, my_role, sync_type,
remote_host, remote_keyname, includes, excludes) +
note_netsync_start (session_id, my_role, sync_type,
remote_host, remote_keyname, includes, excludes)

Called by monotone before any other of the netsync notification hooks are called. The session_id helps keep track of the current netsync @@ -6101,7 +6310,7 @@ The include and exclude patterns used by

-
note_netsync_revision_received (new_id, revision, certs, session_id)
+
note_netsync_revision_received (new_id, revision, certs, session_id)
Called by monotone after the revision new_id is received through netsync. revision is the text of the revision, what would be given by mtn automate get_revision new_id. certs is a @@ -6113,7 +6322,7 @@ tracking, you can ignore that variable e note_netsync_end. If you're not interested in that type of tracking, you can ignore that variable entirely. -
note_netsync_cert_received (rev_id, key, name, value, session_id)
+
note_netsync_cert_received (rev_id, key, name, value, session_id)
Called by monotone after a cert is received through netsync, if the revision that the cert is attached to was not also received in the same netsync operation. rev_id is the revision id that the cert is attached to, @@ -6124,14 +6333,14 @@ tracking, you can ignore that variable e note_netsync_end. If you're not interested in that type of tracking, you can ignore that variable entirely. -
note_netsync_pubkey_received (keyname, session_id)
+
note_netsync_pubkey_received (keyname, session_id)
Called by monotone after a pubkey is received through netsync. keyname is the name of the key received. There is no default definition for this hook. session_id is used together with note_netsync_start and note_netsync_end. If you're not interested in that type of tracking, you can ignore that variable entirely. -
note_netsync_end (session_id, status,
bytes_in, bytes_out, certs_in, certs_out, +
note_netsync_end (session_id, status,
bytes_in, bytes_out, certs_in, certs_out, revs_in, revs_out, keys_in, keys_out)

Called by monotone after all other the netsync notification hooks have @@ -6179,6 +6388,14 @@ data was transferred. have been transferred, xx2 means no data was transferred, and xx0 means all data was transferred. +

note_mtn_startup (...)
+Called by monotone when it is first started, this hook was added so that +usage of monotone could be monitored for user interface testing. Note +that by default, no monitoring occurs. The arguments to the hook +function are the arguments to monotone, without the initial +mtn command. They can be accessed through the lua arg +variable which contains the variable list of arguments. +

6.1.2 User Defaults

@@ -6188,7 +6405,7 @@ prompted for. prompted for.
-
get_branch_key (branchname)
+
get_branch_key (branchname)
Returns a string which is the name of an rsa private key used to sign certificates in a particular branch branchname. There is no default definition for this hook. The command-line option @@ -6198,7 +6415,7 @@ to use the unique private key. --key=keyname option; monotone will guess that you want to use the unique private key. -
get_passphrase (keypair_id)
+
get_passphrase (keypair_id)
Returns a string which is the passphrase used to encrypt the private half of keypair_id in your database, using the arc4 symmetric cipher. keypair_id is a Lua string containing the label that you @@ -6207,22 +6424,33 @@ a passphrase each time it needs to use a this hook is not defined or returns false, monotone will prompt you for a passphrase each time it needs to use a private key. -
get_author (branchname)
+
get_author (branchname, keypair_id)
Returns a string which is used as a value for automatically generated author certificates when you commit changes to -branchname. Generally this hook remains undefined, and monotone -selects your signing key name for the author certificate. You can use -this hook to override that choice, if you like. +branchname with the keypair identity keypair_id. Generally +this hook remains undefined, and monotone selects your signing key name +for the author certificate. You can use this hook to override that +choice, if you like. -

This hook has no default definition, but a possible definition might be: -

          function get_author(branchname)
+     

This hook has no default definition, but a couple of possible +definitions might be: +

          function get_author(branchname, keypair_id)
+                  -- Key pair identity ignored.
                   local user = os.getenv("USER")
                   local host = os.getenv("HOSTNAME")
                   if ((user == nil) or (host == nil)) then return nil end
                   return string.format("address@hidden", user, host)
           end
      
-
edit_comment (commentary, user_log_message)
+
          function get_author(branchname, keypair_id)
+                  -- Branch name ignored.
+                  if (keypair_id == "address@hidden") then
+                          return "Joe Random <address@hidden>"
+                  end
+                  return keypair_id
+          end
+     
+
edit_comment (commentary, user_log_message)
Returns a log entry for a given set of changes, described in commentary. The commentary is identical to the output of mtn status. This hook is intended to interface with @@ -6239,7 +6467,7 @@ the system up for another edit/commit cy

For the default definition of this hook, see Default hooks. -

persist_phrase_ok ()
+
persist_phrase_ok ()
Returns true if you want monotone to remember the passphrase of a private key for the duration of a single command, or false if you want monotone to prompt you for a passphrase for each certificate @@ -6252,7 +6480,7 @@ probably want this hook to return return true end
-
use_inodeprints ()
+
use_inodeprints ()
Returns true if you want monotone to automatically enable Inodeprints support in all workspaces. Only affects working copies created after you modify the hook. @@ -6262,7 +6490,7 @@ copies created after you modify the hook return false end -
ignore_file (filename)
+
ignore_file (filename)
Returns true if filename should be ignored while adding, dropping, or moving files. Otherwise returns false. This is most important when performing recursive actions on directories, which @@ -6275,7 +6503,7 @@ default definition of this hook, see Default hooks. -
ignore_branch (branchname)
+
ignore_branch (branchname)
Returns true if branchname should be ignored while listing branches. Otherwise returns false. This hook has no default definition, therefore the default behavior is to list all branches. @@ -6292,7 +6520,7 @@ changed. changed.
-
get_netsync_read_permitted (branch, identity)
+
get_netsync_read_permitted (branch, identity)
Returns true if a peer authenticated as key identity should be allowed to read from your database certs, revisions, manifests, and files associated with branch; otherwise false. @@ -6334,7 +6562,7 @@ key fingerprints of each key in your dat key fingerprints of each key in your database, as key ID strings are “convenience names”, not security tokens. -
get_netsync_write_permitted (identity)
+
get_netsync_write_permitted (identity)
Returns true if a peer authenticated as key identity should be allowed to write into your database certs, revisions, manifests, and files; otherwise false. The default definition of this hook reads a file @@ -6373,7 +6601,7 @@ a TCP socket. a TCP socket.
-
get_netsync_connect_command (uri, args)
+
get_netsync_connect_command (uri, args)
Returns a table describing a command to run to connect to the specified host. The uri argument is a table containing between 0 and 7 components: @@ -6452,7 +6680,7 @@ components: return argv end -
use_transport_auth (uri)
+
use_transport_auth (uri)
Returns a boolean indicating whether monotone should use transport authentication mechanisms when communicating with uri. If this hook fails, the return value is assumed to be true. The form of @@ -6478,7 +6706,7 @@ authentication assumptions. end end -
get_mtn_command(host)
+
get_mtn_command(host)
Returns a string containing the monotone command to be executed on host when communicating over ssh. The host argument is a string containing the name of the host to which @@ -6510,7 +6738,7 @@ valid revisions, according to their own valid revisions, according to their own preferences and purposes.
-
get_revision_cert_trust (signers, id, name, val)
+
get_revision_cert_trust (signers, id, name, val)
Returns whether or not you trust the assertion name=value on a given revision id, given a valid signature from all the keys in signers. The signers @@ -6556,7 +6784,7 @@ the revision has been approved by an ext the revision has been approved by an extra “reviewer” who used the approve command. -
accept_testresult_change (old_results, new_results)
+
accept_testresult_change (old_results, new_results)
This hook is used by the update algorithm to determine whether a change in test results between update source and update target is acceptable. The hook is called with two tables, each of which maps a @@ -6580,7 +6808,7 @@ version carrying the old_results

This definition accepts only those updates which preserve the set of -true test results from update source to target. If no rest +true test results from update source to target. If no test results exist, this hook has no affect; but once a true test result is present, future updates will require it. If you want a more lenient behavior you must redefine this hook. @@ -6594,7 +6822,7 @@ customisation of the way file difference customisation of the way file differences are shown.

-
get_encloser_pattern (file_path)
+
get_encloser_pattern (file_path)
Called for each file when diff is given the --show-encloser option (and not the --external option). file_path is the pathname of the @@ -6609,7 +6837,7 @@ make it to the default for that language hook; and if you send it to the monotone developers, we will likely make it to the default for that language. -
external_diff (file_path, old_data, new_data, is_binary,
diff_args, old_rev, new_rev) +
external_diff (file_path, old_data, new_data, is_binary,
diff_args, old_rev, new_rev)

Called for each file when diff is given the --external option. file_path is the pathname of the @@ -6644,7 +6872,7 @@ you have a tool specific to certain file

-
merge3 (ancestor_path, left_path, right_path, merged_path, ancestor_text, left_text, right_text)
+
merge3 (ancestor_path, left_path, right_path, merged_path, ancestor_text, left_text, right_text)
This hook is called to resolve merges that monotone could not resolve automatically. The actual ancestor, left, and right contents of the file are passed in the ancestor_text, left_text, and @@ -6667,7 +6895,7 @@ local system. For details, see the code local system. For details, see the code in Default hooks.

-

get_preferred_merge3_command(tbl)
+
get_preferred_merge3_command(tbl)
Returns the results of running an external merge on three strings. tbl wraps up the various arguments for each merge command and is always provided by merge3. If there is a particular editor @@ -6687,7 +6915,7 @@ expand them to their full form.

For more detail on the use of selectors, see Selectors.

-
expand_selector (str)
+
expand_selector (str)
Attempts to expand str as a selector. Expansion generally means providing a type prefix for the selector, such as a: for authors or d: for dates. This hook is called once for each element of a @@ -6695,7 +6923,7 @@ evaluation of the selector. For the defa evaluation of the selector. For the default definition of this hook, see Default hooks. -
expand_date (str)
+
expand_date (str)
Attempts to expand str as a date expression. Expansion means recognizing and interpreting special words such as yesterday or 6 months ago and converting them into well formed date @@ -6718,7 +6946,7 @@ according to its attributes when the wor according to its attributes when the workspace is changed.
-
attr_functions [attribute] (filename, value)
+
attr_functions [attribute] (filename, value)
This is not a hook function, but a table of hook functions. Each entry in the table attr_functions, at table entry attribute, is a function taking a file name filename @@ -6731,17 +6959,17 @@ lists, or special file types. platform-specific attributes, such as permission bits, access control lists, or special file types. -

By default, there is only one entry in this table, for the execute +

By default, there is only one entry in this table, for the mtn:execute attribute. Its definition is: -

          attr_functions["execute"] =
+     
          attr_functions["mtn:execute"] =
             function(filename, value)
                   if (value == "true") then
                    make_executable(filename)
                 end
              end
      
-
attr_init_functions [attribute] (filename)
+
attr_init_functions [attribute] (filename)
This is not a hook function, but a table of hook functions. Each entry in the table attr_init_functions, at table entry attribute, is a function taking a file (or @@ -6750,20 +6978,21 @@ hook functions is called once for each f hook functions is called once for each file during an add.

By default, there are only two entries in this table, for the -execute and manual_merge attributes. Their definition is: +mtn:execute and mtn:manual_merge attributes. Their +definition is: -

          attr_init_functions["execute"] =
+     
          attr_init_functions["mtn:execute"] =
              function(filename)
                 if (is_executable(filename)) then
                   return "true"
                 else
                   return nil
-                  end
-            end
-          attr_init_functions["manual_merge"] =
+                end
+             end
+          attr_init_functions["mtn:manual_merge"] =
              function(filename)
                 if (binary_file(filename)) then
-                  return "true" -- binary files must merged manually
+                  return "true" -- binary files must be merged manually
                 else
                   return nil
                 end
@@ -6780,7 +7009,7 @@ allow a client to validate or reject cer
 allow a client to validate or reject certain behaviors.
 
      
-
validate_commit_message (message, revision_text, branchname)
+
validate_commit_message (message, revision_text, branchname)
This hook is called after the user has entered his/her commit message. message is the commit message that the user has entered and revision_text is the full text of the changes for this revision, @@ -6802,7 +7031,7 @@ hook writers. hook writers.
-
existonpath(possible_command)
+
existonpath(possible_command)
This function receives a string containing the name of an external program and returns 0 if it exists on path and is executable, -1 otherwise. @@ -6812,46 +7041,56 @@ for “xxdiff.exe”. program name. In the previous example, existonpath would search for “xxdiff.exe”. -
guess_binary(filespec)
+
get_confdir()
+Returns the path to the configuration directory, either implied or given +with --confdir. + +
get_ostype()
+Returns the operating system flavor as a string. + +
guess_binary_file_contents(filespec)
Returns true if the file appears to be binary, i.e. contains one or more of the following characters:
          0x00 thru 0x06
           0x0E thru 0x1a
           0x1c thru 0x1f
      
-
include(scriptfile)
+
include(scriptfile)
This function tries to load and execute the script contained into scriptfile. It returns true for success and false if there is an error. -
includedir(scriptpath)
+
includedir(scriptpath)
This function loads and executes in alphabetical order all the scripts contained into the directory scriptpath. If one of the scripts has an error, the functions doesn't process the remaining scripts and immediately returns false. -
includedirpattern(scriptpath, pattern)
+
includedirpattern(scriptpath, pattern)
This function loads and executes in alphabetical order all the scripts contained into the directory scriptpath that match the given pattern. If one of the scripts has an error, the functions doesn't process the remaining scripts and immediately returns false. -
is_executable(filespec)
+
is_executable(filespec)
This function returns true if the file is executable, false otherwise. On Windows this function returns always false. -
kill(pid [, signal])
+
kill(pid [, signal])
This function calls the kill() C library function on POSIX systems and TerminateProcess on Win32 (in that case pid is the process handle). If the optional signal parameter is missing, SIGTERM will be used. Returns 0 on success, -1 on error. -
make_executable(filespec)
+
make_executable(filespec)
This function marks the named file as executable. On Windows has no effect. -
mkstemp(template)
+
match(glob, string)
+Returns true if glob matches str, return false otherwise. + +
mkstemp(template)
Like its C library counterpart, mkstemp creates a unique name and returns a file descriptor for the newly created file. The value of template should be a pointer to a character buffer loaded @@ -6873,28 +7112,7 @@ For the definition of temp_file()< file in the standard TMP/TEMP directories. For the definition of temp_file(), see Default hooks. -
sleep(seconds)
-Makes the calling process sleep for the specified number of seconds. - -
spawn(executable [, args ...])
-Starts the named executable with the given arguments. Returns the -process PID on POSIX systems, the process handle on Win32 or -1 if -there was an error. -Calls fork/execvp on POSIX, CreateProcess on Win32. - -

Important notice:
-To spawn a process and wait for its completion, use the execute() -function, unless you need to run monotone with the --nostd -option. execute() builds on spawn() and wait() -in a standardized way. - -

wait(pid)
-Wait until the process with given PID (process handle on Win32) exits. -Returns two values: a result value and the exit code of the waited-for -process. -The exit code is meaningful only if the result value is 0. - -
parse_basic_io(data)
+
parse_basic_io(data)
Parse the string data, which should be in basic_io format. It returns nil if it can't parse the string; otherwise it returns a table. This will be a list of all statements, with each entry being a table having a "name" element that is @@ -6916,8 +7134,43 @@ the arguments. 4 = { name = "frob", args = { 1 = "oops" } } }
-
+
regex.search(regexp, string)
+Returns true if a match for regexp is found in str, return +false otherwise. +
sleep(seconds)
+Makes the calling process sleep for the specified number of seconds. + +
spawn(executable [, args ...])
+Starts the named executable with the given arguments. Returns the +process PID on POSIX systems, the process handle on Win32 or -1 if +there was an error. +Calls fork/execvp on POSIX, CreateProcess on Win32. + +

Important notice:
+To spawn a process and wait for its completion, use the execute() +function, unless you need to run monotone with the --nostd +option. execute() builds on spawn() and wait() +in a standardized way. + +

spawn_pipe(executable [, args ...])
+Like spawn(), but returns three values, where the first two are the +subprocess' standard input and standard output, and the last is the +process PID on POSIX systems, the process handle on Win32 or -1 if +there was an error. + +
spawn_redirected(infile, outfile, errfile, executable [, args ...])
+Like spawn(), but with standard input, standard output and standard +error redirected to the given files. + +
wait(pid)
+Wait until the process with given PID (process handle on Win32) exits. +Returns two values: a result value and the exit code of the waited-for +process. +The exit code is meaningful only if the result value is 0. + +
+

7 Special Topics

@@ -8284,7 +8537,7 @@ attr_init_functions["mtn:manual_merge"] attr_init_functions["mtn:manual_merge"] = function(filename) if (binary_file(filename)) then - return "true" -- binary files must merged manually + return "true" -- binary files must be merged manually else return nil end @@ -8319,7 +8572,9 @@ function ignore_file(name) if (ignfile ~= nil) then local line = ignfile:read() while (line ~= nil) do - table.insert(ignored_files, line) + if line ~= "" then + table.insert(ignored_files, line) + end line = ignfile:read() end io.close(ignfile) @@ -9200,221 +9455,235 @@ end

Index


Fotnoter

[1] We ============================================================ # monotone.pdf is binary