From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alberto Luaces Newsgroups: gmane.emacs.help Subject: Re: Committing only specific hunks in VC Date: Wed, 12 Jan 2011 09:53:34 +0100 Message-ID: <874o9eo641.fsf@eps142.cdf.udc.es> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1294822554 16151 80.91.229.12 (12 Jan 2011 08:55:54 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 12 Jan 2011 08:55:54 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jan 12 09:55:50 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PcwUf-0004Ns-6u for geh-help-gnu-emacs@m.gmane.org; Wed, 12 Jan 2011 09:55:49 +0100 Original-Received: from localhost ([127.0.0.1]:50352 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PcwUe-0003ho-ND for geh-help-gnu-emacs@m.gmane.org; Wed, 12 Jan 2011 03:55:48 -0500 Original-Received: from [140.186.70.92] (port=57893 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PcwU1-0003h0-2m for help-gnu-emacs@gnu.org; Wed, 12 Jan 2011 03:55:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PcwU0-0002Fg-23 for help-gnu-emacs@gnu.org; Wed, 12 Jan 2011 03:55:08 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:59076) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PcwTz-0002F6-Mc for help-gnu-emacs@gnu.org; Wed, 12 Jan 2011 03:55:07 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PcwTx-00043t-Ko for help-gnu-emacs@gnu.org; Wed, 12 Jan 2011 09:55:05 +0100 Original-Received: from eps142.cdf.udc.es ([193.144.52.142]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 12 Jan 2011 09:55:05 +0100 Original-Received: from aluaces by eps142.cdf.udc.es with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 12 Jan 2011 09:55:05 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 21 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: eps142.cdf.udc.es User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) Cancel-Lock: sha1:5GDgDZ2r3KbMELsxzGjXQ7elhfw= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:78403 Archived-At: suvayu ali writes: > On Mon, Jan 10, 2011 at 9:40 PM, Deniz Dogan wrote: >> 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. > > 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? 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