unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* vc wish: walk through diffs
@ 2010-11-25 15:02 Lars Magne Ingebrigtsen
  2010-11-25 15:15 ` Davis Herring
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Lars Magne Ingebrigtsen @ 2010-11-25 15:02 UTC (permalink / raw)
  To: emacs-devel

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? 

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: vc wish: walk through diffs
  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
  2 siblings, 1 reply; 10+ messages in thread
From: Davis Herring @ 2010-11-25 15:15 UTC (permalink / raw)
  To: emacs-devel

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

You can approximate this with `C-x v l D', then navigate, D, etc.  (You
may need C-SPC to avoid a region-based choice of revisions.)

Davis

-- 
This product is sold by volume, not by mass.  If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: vc wish: walk through diffs
  2010-11-25 15:02 vc wish: walk through diffs Lars Magne Ingebrigtsen
  2010-11-25 15:15 ` Davis Herring
@ 2010-11-25 15:19 ` Andreas Schwab
  2010-11-25 16:40 ` Stefan Monnier
  2 siblings, 0 replies; 10+ messages in thread
From: Andreas Schwab @ 2010-11-25 15:19 UTC (permalink / raw)
  To: emacs-devel

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

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

What's wrong with C-xvl?

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: vc wish: walk through diffs
  2010-11-25 15:02 vc wish: walk through diffs Lars Magne Ingebrigtsen
  2010-11-25 15:15 ` Davis Herring
  2010-11-25 15:19 ` Andreas Schwab
@ 2010-11-25 16:40 ` Stefan Monnier
  2010-11-25 18:25   ` Eli Zaretskii
                     ` (2 more replies)
  2 siblings, 3 replies; 10+ messages in thread
From: Stefan Monnier @ 2010-11-25 16:40 UTC (permalink / raw)
  To: emacs-devel

> 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



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: vc wish: walk through diffs
  2010-11-25 16:40 ` Stefan Monnier
@ 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 21:41   ` Lars Magne Ingebrigtsen
  2 siblings, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2010-11-25 18:25 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

> From: Stefan Monnier <monnier@IRO.UMontreal.CA>
> Date: Thu, 25 Nov 2010 11:40:18 -0500
> 
> 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.

I share that dream.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: vc wish: walk through diffs
  2010-11-25 16:40 ` Stefan Monnier
  2010-11-25 18:25   ` Eli Zaretskii
@ 2010-11-25 19:02   ` Andreas Schwab
  2010-11-25 19:30     ` Óscar Fuentes
  2010-11-25 21:41   ` Lars Magne Ingebrigtsen
  2 siblings, 1 reply; 10+ messages in thread
From: Andreas Schwab @ 2010-11-25 19:02 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

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

Should be pretty easy to do with annotate --porcelain.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: vc wish: walk through diffs
  2010-11-25 19:02   ` Andreas Schwab
@ 2010-11-25 19:30     ` Óscar Fuentes
  0 siblings, 0 replies; 10+ messages in thread
From: Óscar Fuentes @ 2010-11-25 19:30 UTC (permalink / raw)
  To: emacs-devel

Andreas Schwab <schwab@linux-m68k.org> writes:

> Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
>
>> 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.
>
> Should be pretty easy to do with annotate --porcelain.

Yep, and the last remaining step is

alias bzr=git

:-/




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: vc wish: walk through diffs
  2010-11-25 15:15 ` Davis Herring
@ 2010-11-25 21:39   ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 10+ messages in thread
From: Lars Magne Ingebrigtsen @ 2010-11-25 21:39 UTC (permalink / raw)
  To: emacs-devel

"Davis Herring" <herring@lanl.gov> writes:

> You can approximate this with `C-x v l D', then navigate, D, etc.

Oh, thanks.  I didn't know about that command...  That seems quite
convenient.  Perhaps `M-p'/`M-n' could be added to diff mode based on
that, but I'm not sure that's really necessary.  

> (You may need C-SPC to avoid a region-based choice of revisions.)

The way `D' works is kinda odd, though.  There aren't many (common)
functions that work on a region (or not) that way.  I've actually never
used the `C-SPC' command before.  :-)

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: vc wish: walk through diffs
  2010-11-25 16:40 ` Stefan Monnier
  2010-11-25 18:25   ` Eli Zaretskii
  2010-11-25 19:02   ` Andreas Schwab
@ 2010-11-25 21:41   ` Lars Magne Ingebrigtsen
  2 siblings, 0 replies; 10+ messages in thread
From: Lars Magne Ingebrigtsen @ 2010-11-25 21:41 UTC (permalink / raw)
  To: emacs-devel

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

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

Yeah, that'd be a great feature.  I use "annotate" all the time to try
to find out what happened where and why, but this would be way more
convenient.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: vc wish: walk through diffs
  2010-11-25 18:25   ` Eli Zaretskii
@ 2010-11-26  5:16     ` Aneesh Kumar K. V
  0 siblings, 0 replies; 10+ messages in thread
From: Aneesh Kumar K. V @ 2010-11-26  5:16 UTC (permalink / raw)
  To: Eli Zaretskii, Stefan Monnier; +Cc: emacs-devel

On Thu, 25 Nov 2010 20:25:44 +0200, Eli Zaretskii <eliz@gnu.org> wrote:
> > From: Stefan Monnier <monnier@IRO.UMontreal.CA>
> > Date: Thu, 25 Nov 2010 11:40:18 -0500
> > 
> > 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.
> 
> I share that dream.
> 

mo-git-blame supports that for git

http://xxx.bunkus.org/cgi-bin/gitweb.cgi?p=mo-git-blame.git;a=summary

-aneesh



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-11-26  5:16 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).