== Commits Extension == '''This extension is not distributed with Mercurial.''' ''Author: Martin Blais'' Source code: [[http://furius.ca/pubcode/pub/conf/lib/python/hgblais/commits.py]] Web page: [[http://furius.ca/pubcode/pub/conf/lib/python/hgblais/commits.py.html]] Compatibility: Mercurial 0.9.5 and beyond. Unix-only (depends on the termios module). === Overview === A Mercurial extension that allows the user to commit modified files as multiple [[ChangeSet|changesets]], in a single operation. An editor is invoked with the current list of modified files, and the user needs to edit the file, adding a single comment line before each set of lines, separated by some empty lines between each desired changeset, something like this: {{{ Modified project files. M docs/flair.txt M docs/dmping.txt Added extra careful tracing and assertions. M common/lib/pyfff/tracing.py M common/lib/googoo/logging.c M common/lib/googoo/strutils.c New test utilities. M docs/testutils.txt M common/lib/pyfff/__init__.py A common/lib/pyfff/testutil }}} Each set will be committed independently when you exit the editor. === Configuration === Configure your [[.hgrc]] to enable the extension by adding following lines: {{{ [extensions] commits = }}} Place commits.py somewhere accessible from your PYTHONPATH. === Usage Scenario === When you do work on many different tasks in a single checkout (that's pretty much "all the time" for the author) and would like to split your commits into coherent tasks, use this to partition your modified files in distinct commits instead of the 'commit' command. In your text editor, just edit the file as above. === See also === You may also interest in the RecordExtension. ---- CategoryExtensionsByOthers