Differences between revisions 8 and 9
Revision 8 as of 2007-09-04 18:49:00
Size: 898
Editor: AlanSalewski
Comment:
Revision 9 as of 2007-09-04 19:08:25
Size: 1801
Editor: AlanSalewski
Comment: Added comments for 'darcs record' refugees
Deletions are marked like this. Additions are marked like this.
Line 22: Line 22:
=== For darcs record Refugees ===

For the most part, the {{{hg record}}} will be immediately comfortable in the hands of {{{darcs record}}} users. However, one difference that you may notice immediately is that {{{hg record}}} the first prompt you are presented with seems to imply that all patch hunks for a give file will be committed if you answer "{{{Y}}}" to the prompt:

{{{
$ hg record foo
diff --git a/foo b/foo
2 hunks, 4 lines changed
record changes to 'foo'? [Ynsfdaq?]
}}}

Actually, mercurial is asking you if you want to consider ''any'' of the patch hunks from the file for committing, or whether all of them should be ignored. Answering "{{{n}}}" will cause {{{hg record}}} to simply move on to the next file that has changes (if any). Answering "{{{Y}}}", on the other hand, will cause {{{hg record}}} to start prompting you about the individual patch hunks in the file.

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.

2. Configuration

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

[extensions]
record=

/!\ The 'record' extension is not part of the current stable release of mercurial (0.9.4), but it is present in [http://selenic.com/repo/hg-stable the main stable repository] (the repository that leads to the next stable release). See also DeveloperRepos

3. For darcs record Refugees

For the most part, the hg record will be immediately comfortable in the hands of darcs record users. However, one difference that you may notice immediately is that hg record the first prompt you are presented with seems to imply that all patch hunks for a give file will be committed if you answer "Y" to the prompt:

$ hg record foo
diff --git a/foo b/foo
2 hunks, 4 lines changed
record changes to 'foo'? [Ynsfdaq?]

Actually, mercurial is asking you if you want to consider any of the patch hunks from the file for committing, or whether all of them should be ignored. Answering "n" will cause hg record to simply move on to the next file that has changes (if any). Answering "Y", on the other hand, will cause hg record to start prompting you about the individual patch hunks in the file.


CategoryExtension

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