GNU bug report logs - #38044
27.0.50; There should be an easier way to look at a specific vc commit

Previous Next

Package: emacs;

Reported by: Lars Ingebrigtsen <larsi <at> gnus.org>

Date: Sun, 3 Nov 2019 15:18:03 UTC

Severity: wishlist

Tags: fixed

Found in version 27.0.50

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #92 received at 38044 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: larsi <at> gnus.org, stephen.berman <at> gmx.net, 38044 <at> debbugs.gnu.org,
 dgutov <at> yandex.ru
Subject: Re: bug#38044: 27.0.50; There should be an easier way to look at a
 specific vc commit
Date: Thu, 21 Nov 2019 16:59:02 +0200
> From: Juri Linkov <juri <at> linkov.net>
> Cc: dgutov <at> yandex.ru,  larsi <at> gnus.org,  stephen.berman <at> gmx.net,
>   38044 <at> debbugs.gnu.org
> Date: Wed, 20 Nov 2019 23:50:00 +0200
> 
> >> Then we could use something like the existing backend 'region-history'
> >> that for vc-git uses 'git log', but displays both the log and diff
> >> in one output buffer.
> >
> > region-history is slow, so I'm not sure it is a good starting point
> > for this feature.  A diff command is usually very fats with every VCS.
> 
> It doesn't use 'region-history'.  I meant using 'region-history-mode'
> on the output buffer.

Ah, okay.  Btw, region-history-mode is a Git-only feature, so I don't
think I understand why it is in vc.el and not in vc-git.el.

> Everything works perfectly with this patch that also implements
> defaulting to the revision under point and prompting for the
> directory like Lars asked to do:

Thanks.  A few comments:

> +;; - print-revision (revision)
> +;;
> +;;   Show details of REVISION.
> +;;

I'd prefer this to be a variant of vc-diff, and bound to "C-x v =".
The "C-u C-x v =" form is already taken, and tweaking it to accept a
single revision would not be easy.  So how about "C-u C-u C-x v ="?

The reason I think this should be a vc-diff subcommand is that most
kinds of VCS describe a revision as diffs.  Where a revision's
description is expected to include meta-data, i.e. the VCS backend
provides a command to show a revision in that format, we should use
that backend command, of course.  But conceptually we just show diffs,
so inventing a whole new class of VC commands for a minor variant of
diffs display sounds sub-optimal to me.

Also, why only implement this for a single backend?  The corresponding
diff commands exist in every VCS we support, so let's implement this
for all of them, okay?  Let us know if you need help with other VCSes.

Finally, this needs documentation in NEWS and in the user manual.




This bug report was last modified 4 years and 355 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.