Differences between revisions 8 and 18 (spanning 10 versions)
Revision 8 as of 2008-09-05 22:17:40
Size: 2076
Editor: tonfa
Comment: it is now distributed
Revision 18 as of 2012-05-17 04:00:31
Size: 1661
Editor: mpm
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
''Author: Bryan O'Sullivan'' ''Authors: Bryan O'Sullivan, Nicolas Dumazet''

'''This extension has been included with Mercurial since version 1.0'''

<!> This feature is [[UnlovedFeatures|unloved]].
<!> This feature has known correctness issues.
Line 7: Line 12:
This extension uses the Linux 2.6 inotify API to make status instantaneous for even very large repositories, by subscribing to the paths in the repository instead of having to check them all at every status command. This extension makes status requests instantaneous for even very large repositories, by subscribing to the paths in the repository instead of having to check them all at every status command.

Inotify is currently a Linux-only extension, using the Linux 2.6 inotify API.

An alpha Mac OS port is now available: it uses the MacOS 10.5 FSEvents API through the [[http://pypi.python.org/pypi/pyfsevents|pyfsevents]] module. It can be tested by ''qcloning'' [[http://bitbucket.org/nicdumz/mercurial-crew-mq/|Nicolas's MQ]] (''hg qclone [url]; hg qpush -a'')
Line 10: Line 19:

The inotify extension is now distributed with the Mercurial source, though it is not yet present in a formal release.
Line 22: Line 29:
The extension contains both a server and a client component. By default, you have to start the server by hand, using the {{{hg inserve}}} command. To make it start automatically, edit your hgrc: The extension contains both a server and a client component. By default, it will start automatically. To prevent this, edit either your global ~/.hgrc or .hg/hgrc in repositories where you don't want to use inotify:
Line 26: Line 33:
autostart = True autostart = False
Line 29: Line 36:
== Obsolete installation instructions ==

These instructions apply to older, out-of-tree versions of the inotify extension.

=== Installation ===

The inotify extension requires Bryan's [http://hg.kublai.com/python/inotify python bindings for inotify]. You can either install them the normal way (via {{{setup.py}}}) or do an in-place build {{{setup.py build_ext -i}}}, then create a symlink from the inotify directory into the inotify extension directory. For example:
The server runs in the background as a daemon when started automatically. To start it manually, use the command:
Line 38: Line 39:
$ hg clone http://hg.kublai.com/python/inotify python-inotify
$ cd python-inotify
$ python setup.py build_ext -i
$ cd ..
$ hg clone http://hg.kublai.com/mercurial/extensions/inotify
$ cd inotify
$ ln -s ../python-inotify/inotify .
$ hg inserve [-d]
Line 47: Line 42:
The extension should now be ready to use.

=== Configuration ===
Configure your .hgrc to enable the extension by adding following lines:

{{{
[extensions]
inotify=/path/to/inotify
}}}

You can either start up the inotify extension on a repository with {{{hg inserve}}} or have it autostart with the following .hgrc snippet (either global or in the repository {{{.hg/hgrc}}} in which you would like to use inotify:
By default, the server output will be lost. You can use the ''log'' option to capture the server output:
Line 61: Line 46:
autostart = true log = '/tmp/inotify.log'
Line 64: Line 49:
== See also ==

 * InotifyBug
Line 65: Line 54:
CategoryExtension CategoryBundledExtension

Inotify Extension

Authors: Bryan O'Sullivan, Nicolas Dumazet

This extension has been included with Mercurial since version 1.0

<!> This feature is unloved. <!> This feature has known correctness issues.

Overview

This extension makes status requests instantaneous for even very large repositories, by subscribing to the paths in the repository instead of having to check them all at every status command.

Inotify is currently a Linux-only extension, using the Linux 2.6 inotify API.

An alpha Mac OS port is now available: it uses the MacOS 10.5 FSEvents API through the pyfsevents module. It can be tested by qcloning Nicolas's MQ (hg qclone [url]; hg qpush -a)

Installation and configuration

To enable it, edit your hgrc:

[extensions]
inotify =

You can either enable it for each individual repository you need it in, or globally.

The extension contains both a server and a client component. By default, it will start automatically. To prevent this, edit either your global ~/.hgrc or .hg/hgrc in repositories where you don't want to use inotify:

[inotify]
autostart = False

The server runs in the background as a daemon when started automatically. To start it manually, use the command:

$ hg inserve [-d]

By default, the server output will be lost. You can use the log option to capture the server output:

[inotify]
log = '/tmp/inotify.log'

See also


CategoryBundledExtension

InotifyExtension (last edited 2014-03-24 01:53:35 by Rain)