unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: emacs-devel@gnu.org
Subject: Re: vc wish: walk through diffs
Date: Thu, 25 Nov 2010 11:40:18 -0500	[thread overview]
Message-ID: <jwv8w0h2wlq.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <m34ob5winb.fsf@quimbies.gnus.org> (Lars Magne Ingebrigtsen's message of "Thu, 25 Nov 2010 16:02:48 +0100")

> 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-<backend>-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



  parent reply	other threads:[~2010-11-25 16:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-25 15:02 vc wish: walk through diffs Lars Magne Ingebrigtsen
2010-11-25 15:15 ` Davis Herring
2010-11-25 21:39   ` Lars Magne Ingebrigtsen
2010-11-25 15:19 ` Andreas Schwab
2010-11-25 16:40 ` Stefan Monnier [this message]
2010-11-25 18:25   ` Eli Zaretskii
2010-11-26  5:16     ` Aneesh Kumar K. V
2010-11-25 19:02   ` Andreas Schwab
2010-11-25 19:30     ` Óscar Fuentes
2010-11-25 21:41   ` Lars Magne Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv8w0h2wlq.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).