GNU bug report logs - #62940
29.0.60; vc: no easy way to get diff of all outgoing changes

Previous Next

Package: emacs;

Reported by: Spencer Baugh <sbaugh <at> janestreet.com>

Date: Tue, 18 Apr 2023 19:13:02 UTC

Severity: wishlist

Found in version 29.0.60

Full log


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

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Spencer Baugh <sbaugh <at> janestreet.com>
Cc: 62940 <at> debbugs.gnu.org, Filipp Gunbin <fgunbin <at> fastmail.fm>
Subject: Re: bug#62940: 29.0.60; vc: no easy way to get diff of all outgoing
 changes
Date: Fri, 11 Oct 2024 23:28:56 +0300
On 11/10/2024 18:10, Spencer Baugh wrote:

>     Or alternatively if we would prefer to err on the side of warning the
>     user that the upstream has diverged, I suppose it's the Hg
>     implementation that would need to change. That can result a simpler
>     mental model and documentation as well. What would be Hg's
>     corresponding
>     selector for "tip of upstream branch"?
> 
> 
> I'm not sure, I don't think there's no way to specify that with an hg 
> revset.  Though like most hg users, I don't actually use branches, I use 
> bookmarks; there's a way to do it with bookmarks, I think. I'll investigate.

Thanks. Or if it doesn't make sense for Hg (for example, if the remote 
tip will always be present locally too), that would also be good, then 
the current implementation is just right.

> I think it's useful to think of these two options relative to vc- 
> outgoing and vc-incoming.  Comparing $1 against $2 is equivalent to 
> getting the diff from $3:
> - working-tree merge-base = vc-outgoing
> - merge-base remote-tip = vc-incoming
> - working-tree remote-tip = vc-outgoing+vc-incoming
> 
> The first two are more useful than the third, I think, since the third 
> mixes together two sorts of diffs, making it ambiguous which is which.

Makes sense.

I think #2 might be more conveniently accessed from vc-log-incoming 
(which is the only way to view the separate commits and messages).

Anyway, it seems instead of vc-root-diff we can use vc-diff-mergebase, 
it has the same completion for revisions. With REV1=@{upstream} and 
REV2="", we'll get #1, with reverse - #2. The full key sequence:

  C-u C-x v M D @{upstream} RET C-j

Note that vc-*-mergebase is only implemented for Git. But 
vc-hg-log-incoming is defined -- that seems to indicate that 'mergebase' 
would be useful to support for it too.




This bug report was last modified 24 days ago.

Previous Next


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