2569
Comment:
|
2567
Fix development repository url
|
Deletions are marked like this. | Additions are marked like this. |
Line 19: | Line 19: |
/!\ 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). | /!\ 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 the main development repository] (the repository that leads to the next stable release). |
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 the main development repository] (the repository that leads to the next stable release). See also DeveloperRepos
3. For 'darcs record' Refugees
The following section pertains to the 'record' extension prior to changeset 3ef190234b55:
$ hg log hgext/record.pyBR...BRchangeset: 5285:3ef190234b55BRuser: Bryan O'Sullivan <bos@serpentine.com>BRdate: Thu Sep 06 10:52:54 2007 -0700BRsummary: record: change wording of initial per-file promptBR...
This change clarified the wording of the initial prompt, so the following is no longer relevant. If you encounter the following issue, you should probably just update your hg tree. This section will be updated to remove the irrelevant caveat note once the change has been sufficiently disseminated.
For the most part, the hg record command will be immediately comfortable in the hands of darcs record users. However, one difference that you may notice immediately is that with hg record the first prompt you are presented with seems to imply that all patch hunks for a given 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.