@denizamdogan: "I have a bunch of files that have been modified and I'd like to commit
all of these changes except for one hunk in one of the files.
How would I do this from Emacs? I've heard that it's possible to stage
only specific hunks in magit, but I'm using Mercurial.
Deniz Dogan"
    @monnier: "<quote>
For many years, I've had a local patch to do that in VC, but I recently
threw it out, deciding that it deserves to be rewritten based on the
"new" tools available currently, i.e. stash/shelve.
I haven't used Mercurial enough, but I'd do a "hg shelve" (or "hg
stash" or whatever it's called and if hg doesn't have such
a functionality, I'd do it by hand: "hg diff >shelve1.diff");
Then I'd use C-x v, diff-mode and friends to add/remove changes to get
just the changes I want to commit;
Then "hg commit";
Then "hg unshelve" or "hg unstash" or "patch -p0 <shelve1.diff";
And resolve the potential conflicts, if any.
        Stefan"
    @fatkasuvayulinux: "<quote>
I don't know of a way to do it from Emacs, but with git its trivial to
interactively add the hunks (git add -i file or git add -p file) from
the terminal and then commit from the
terminal or from emacs using vc-dir. Does mercurial has similar
interactive adding facilities?
Suvayu
Open source is the future. It sets us free."
    @aluaces: "suvayu ali writes:
<quote>
I think that currently there's no option for doing it from VC. You can
do it from the command line with "hg record". This requires to have the
"record" extension enabled.
Alberto"
    @gavenko: "<quote>
I usually save common patch in '.diff' like file.
Then in diff-mode can revert patch (C-c C-r), then apply C-c C-a for 
hunks that
don't  like.
After than commit and revert '.diff' again to apply reverted hunks.
This allow don't depend on deep VCS knowledge and available/missing 
features.
Also I practice storing 2 copy of source - working and original/clean.
Applying parts of '.diff' to clean source tree, test, commit and then update
working tree."
    @nospamthankyou: "<quote>
I'd do something similar, when I need to do this in CVS.
I copy the entire tree, and then on the copy use #
M-x cvs-mode and 'd e' to locate the changes I want to remove.
Then I commit from this tree, and afterwards update the original tree.
Patch normally makes a good job of figuring out what to do, unless
one of the non-commited hunks is right beside a commited hunk,
in which case I'd normally delete the original hunk in the conflict and
use 'd e' to decide what parts of the modified hunk to keep.
HTH,
Colin S. Miller
Replace the obvious in my email address with the first three letters of the hostname to reply."
{'source': 'USENET', 'other_information': '{"reply_count": 5, "forum_name": "gnu.emacs.help.20140829.mbox"}', 'file': 'data/output/usenet-gnu.emacs.parquet'}