Next: Merge Conflicts, Previous: Scripting, Up: Advanced Uses [Contents][Index]
Fairly often, in order to accomplish its job, monotone has to look at
your workspace and figure out what has been changed in it since your
last commit. Commands that do this include status
,
diff
, update
, commit
, and others. There
are two different techniques it can use to do this. The default, which
is sufficient for most projects, is to simply read every file in the
workspace, compute their SHA1 hash, and compare them to the
hashes monotone has stored. This is very safe and reliable, and turns
out to be fast enough for most projects. However, on very large
projects, ones whose source trees are many megabytes in size, it can
become unacceptably slow.
The other technique, known as inodeprints, is designed for this situation. When running in inodeprints mode, monotone does not read the whole workspace; rather, it keeps a cache of interesting information about each file (its size, its last modification time, and so on), and skips reading any file for which these values have not changed. This is inherently somewhat less safe, and, as mentioned above, unnecessary for most projects, so it is disabled by default.
If you do determine that it is necessary to use inodeprints with your
project, it is simple to enable them. Simply run mtn
refresh_inodeprints
; this will enable inodeprints mode and generate an
initial cache. If you ever wish to turn them off again, simply delete
the file _MTN/inodeprints. You can at any time delete or truncate
the _MTN/inodeprints file; monotone uses it only as a cache and
will continue to operate correctly.
Normally, instead of enabling this up on a per-workspace basis, you
will want to simply define the use_inodeprints
hook to return
true
; this will automatically enable inodeprints mode in any new
workspaces you create. See Lua Reference for details.
Next: Merge Conflicts, Previous: Scripting, Up: Advanced Uses [Contents][Index]