From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: vc wish: walk through diffs Date: Thu, 25 Nov 2010 11:40:18 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1290708781 24119 80.91.229.12 (25 Nov 2010 18:13:01 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 25 Nov 2010 18:13:01 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 25 19:12:55 2010 Return-path: Envelope-to: ged-emacs-devel@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 1PLgJS-00079b-7k for ged-emacs-devel@m.gmane.org; Thu, 25 Nov 2010 19:12:54 +0100 Original-Received: from localhost ([127.0.0.1]:60213 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PLesH-0004FL-OK for ged-emacs-devel@m.gmane.org; Thu, 25 Nov 2010 11:40:45 -0500 Original-Received: from [140.186.70.92] (port=39117 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PLerv-0004Eb-2w for emacs-devel@gnu.org; Thu, 25 Nov 2010 11:40:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PLert-00005a-SV for emacs-devel@gnu.org; Thu, 25 Nov 2010 11:40:22 -0500 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:59629) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PLert-0008Vq-Lo for emacs-devel@gnu.org; Thu, 25 Nov 2010 11:40:21 -0500 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id oAPGeJ2M017020; Thu, 25 Nov 2010 11:40:19 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id B6B5CA8490; Thu, 25 Nov 2010 11:40:18 -0500 (EST) In-Reply-To: (Lars Magne Ingebrigtsen's message of "Thu, 25 Nov 2010 16:02:48 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3689=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:133137 Archived-At: > One thing I've wanted to have for years is a way to "walk through" the > changesets the current file is part of. > Say I'm in a buffer. I hit (er) `C-x v p' to get the previous changeset > that was applied to this file. Then I hit `M-p' to go to the one before > that, and so on. > I know nothing of the vc internals. Is this doable to implement? Some VCS provide a variant of "log" which shows not just the commit messages, but the corresponding diffs along with them. In Bazaar, for example, you can get it with "bzr log --show-diff". VC does not provide support for such a thing, but it shouldn't be too hard to add it: basically, add a generic vc-print-log-diff command in vc.el which `vc-call-backend' a new `print-log-diff' backend operation, then add a new vc--print-log-diff to your favorite backend (which runs the backend operation asynchronously), and of course create a new major mode for the output, which combines diff-mode and log-view-mode. That would be a very good addition. My dream (which I've been having since before Bazaar-1 (aka baz) forked from Arch) is to extend this command so it doesn't apply just to a (set of) files, but to a particular region of a file: once I can see the history of a particular set of text lines this way, I would never have to deal with "annotate" any more. Stefan