Differences between revisions 18 and 19
Revision 18 as of 2009-01-18 12:16:11
Size: 1942
Comment: Add usage section
Revision 19 as of 2009-02-11 07:59:59
Size: 2317
Comment: feature request
Deletions are marked like this. Additions are marked like this.
Line 63: Line 63:
'''Feature Request''': I would really like to have the ability to split hunks in this plugin. The problem is, that if there are multiple adjacent changes that have nothing to do with each other (like two new functions right next to each other) it is downright hard to commit them separately short of removing one, comitting and adding the other one again. --MartinHäcker

Record Extension

This extension is distributed with Mercurial.

Author: Bryan O'Sullivan

1. Overview

The record extension provides the record command, which may be used in lieu of commit. This command lets you choose which parts of the changes in a working directory you'd like to commit, at the granularity of patch hunks. It is similar in spirit to the [http://darcs.net/manual/node7.html#SECTION00761000000000000000 darcs record] command.

The record extension also provides the qrecord command, if MqExtension is enabled.

2. Configuration

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

[extensions]
hgext.record=

3. Usage

hg record [OPTION]... [FILE]...

The option to examine changes is offered for each one of the selected files (or all the modified files if none is provided):

$ hg record my_dir/my_file.ext
examine changes to 'my_dir/my_file.ext'? [Ynsfdaq?]

where the following responses are possible:

    y - record this change
    n - skip this change

    s - skip remaining changes to this file
    f - record remaining changes to this file

    d - done, skip remaining changes and files
    a - record all changes to all remaining files
    q - quit, recording no changes

    ? - display help

If y is selected, then each of the patch hunks for the file are offered for acceptance or rejection:

@@ -164,5 +164,5 @@
                                     #nice comment
                                     ])
     elif options.action:
-        print >>sys.stderr, "wrong action"
+        print >>sys.stderr, ";wrong action"
     else:
record this change to 'my_dir/my_file.ext'? [Ynsfdaq?]

where the previous options can be used with the same meaning.

After file and hunk selection is finished, a normal commit is recorded.

Feature Request: I would really like to have the ability to split hunks in this plugin. The problem is, that if there are multiple adjacent changes that have nothing to do with each other (like two new functions right next to each other) it is downright hard to commit them separately short of removing one, comitting and adding the other one again. --MartinHäcker


CategoryExtension

RecordExtension (last edited 2016-03-28 19:59:08 by Pierre-YvesDavid)