emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: vc wish: walk through diffs


From: Stefan Monnier
Subject: Re: vc wish: walk through diffs
Date: Thu, 25 Nov 2010 11:40:18 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]