unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#28466: 26.0.50; diff in vc-outgoing doesn't work properly
@ 2017-09-15  4:34 Tom Tromey
  2017-09-16 21:53 ` Tom Tromey
  2017-09-19  2:17 ` bug#28466: doneu Tom Tromey
  0 siblings, 2 replies; 4+ messages in thread
From: Tom Tromey @ 2017-09-15  4:34 UTC (permalink / raw)
  To: 28466


I'm using vc-dir mode.
I used "O" to show the outgoing changes.

In the *vc-outgoing* buffer, I selected the entire buffer
(C-x h) and then typed "=" to make a diff.

I was expecting to see a diff showing the combined contents of all 3 of
my outgoing patches.

However, the generated diff is missing the oldest patch in the series.

Tom



In GNU Emacs 26.0.50 (build 20, x86_64-pc-linux-gnu, GTK+ Version 3.22.17)
 of 2017-09-14 built on bapiya
Repository revision: a7036e04014e5b0548653f26f87ee9e98be05ba3
Windowing system distributor 'Fedora Project', version 11.0.11903000
System Description:	Fedora release 25 (Twenty Five)

Recent messages:
Mark set
Quit [3 times]
Mark activated
next-line: End of buffer
Finding changes in ....
Quit [2 times]
next-line: End of buffer
Mark set
previous-line: Beginning of buffer
Finding changes in ....
scroll-up-command: End of buffer
Configured using:
 'configure --prefix=/home/tromey/Emacs/install'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY
LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 LCMS2

Important settings:
  value of $LANG: en_US.utf8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Diff

Minor modes in effect:
  shell-dirtrack-mode: t
  diff-auto-refine-mode: t
  which-function-mode: t
  erc-services-mode: t
  erc-list-mode: t
  erc-menu-mode: t
  erc-autojoin-mode: t
  erc-ring-mode: t
  erc-networks-mode: t
  erc-pcomplete-mode: t
  erc-track-mode: t
  erc-match-mode: t
  erc-netsplit-mode: t
  erc-hl-nicks-mode: t
  erc-button-mode: t
  erc-fill-mode: t
  erc-stamp-mode: t
  erc-irccontrols-mode: t
  erc-noncommands-mode: t
  erc-move-to-prompt-mode: t
  erc-readonly-mode: t
  savehist-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/home/tromey/.emacs.d/elpa/bubbles-0.5/bubbles hides /home/tromey/Emacs/install/share/emacs/26.0.50/lisp/play/bubbles

Features:
(shadow emacsbug org-bullets org-rmail org-mhe org-irc org-info org-gnus
org-docview doc-view image-mode org-bibtex bibtex org-bbdb org-w3m
org-element avl-tree generator org org-macro org-footnote org-pcomplete
org-list org-faces org-entities noutline outline org-version
ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob ob-table ob-keys ob-exp
ob-comint ob-core ob-eval org-compat org-macs org-loaddefs goto-addr
log-edit tcl smerge-mode find-dired shell shr svg dom supercite regi
mail-hist nnir mm-archive mailalias gnus-html url-queue help-fns
radix-tree browse-url xml url-cache mm-url url url-proxy url-privacy
url-expand url-methods url-history url-cookie url-domsuf url-util sort
smiley gnus-cite gnus-bcklg gnus-async mail-extr gnus-ml disp-table
gnus-topic nndraft nnmh nnfolder utf-7 network-stream nsm starttls
gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg nntp
gnus-cache gnus-registry registry ebdb-gnus gnus-art mm-uu mml2015
mm-view mml-smime smime dig mailcap gnus-sum gnus-group gnus-undo
smtpmail gnus-start gnus-cloud nnimap nnmail mail-source tls gnutls utf7
netrc nnoo parse-time gnus-spec gnus-int gnus-range gnus-win gnus
nnheader pulse etags xref project dabbrev jka-compr misearch
multi-isearch texinfo copyright bug-reference cc-mode cc-fonts cc-guess
cc-menus cc-cmds add-log log-view pcvs-util map vc-git diff-mode
easy-mmode vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs elec-pair flyspell
ispell diminish edmacro kmacro projectile grep compile ibuf-ext ibuffer
ibuffer-loaddefs dash appt diary-lib diary-loaddefs which-func imenu
minimap autorevert filenotify cus-start cus-load status erc-services
erc-list erc-menu erc-join erc-ring erc-networks erc-pcomplete pcomplete
erc-track erc-match erc-netsplit erc-hl-nicks color erc-button erc-fill
erc-stamp wid-edit erc-goodies erc erc-backend erc-compat thingatpt pp
warnings advice vc-dir ewoc vc vc-dispatcher cc-styles cc-align
cc-engine cc-vars cc-defs ebdb-complete ebdb-message sendmail message
puny dired dired-loaddefs format-spec rfc822 mml mml-sec epa derived epg
gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse
rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mail-utils
gmm-utils mailheader ebdb-mua ebdb-com crm mailabbrev ebdb-format qp
ebdb cl-extra help-mode eieio-opt speedbar sb-image ezimage dframe
find-func eieio-base pcase subr-x cal-menu calendar cal-loaddefs
timezone ange-ftp comint ansi-color ring server savehist finder-inf
dwarf-mode-autoloads gdb-shell-autoloads lisppaste-autoloads
pydoc-info-autoloads info-look cl weblogger-autoloads info package
easymenu epg-config url-handlers url-parse auth-source cl-seq eieio
eieio-core cl-macs eieio-loaddefs password-cache url-vars seq byte-opt
gv bytecomp byte-compile cconv cl-loaddefs cl-lib time-date mule-util
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode
lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote dbusbind inotify lcms2 dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 1344642 1361281)
 (symbols 48 53087 3)
 (miscs 40 11459 454)
 (strings 32 518815 50035)
 (string-bytes 1 13923769)
 (vectors 16 242764)
 (vector-slots 8 2919741 62026)
 (floats 8 519 469)
 (intervals 56 20555 1635)
 (buffers 992 57))





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

* bug#28466: 26.0.50; diff in vc-outgoing doesn't work properly
  2017-09-15  4:34 bug#28466: 26.0.50; diff in vc-outgoing doesn't work properly Tom Tromey
@ 2017-09-16 21:53 ` Tom Tromey
  2017-09-19  0:39   ` Dmitry Gutov
  2017-09-19  2:17 ` bug#28466: doneu Tom Tromey
  1 sibling, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2017-09-16 21:53 UTC (permalink / raw)
  To: Tom Tromey; +Cc: 28466

Tom> I was expecting to see a diff showing the combined contents of all 3 of
Tom> my outgoing patches.

Tom> However, the generated diff is missing the oldest patch in the series.

The appended patch fixes this for me.
I'll put it on the Emacs 26 branch after a few days, unless there are
comments.

Tom

diff --git a/lisp/vc/log-view.el b/lisp/vc/log-view.el
index 52f56ed..d6963d0 100644
--- a/lisp/vc/log-view.el
+++ b/lisp/vc/log-view.el
@@ -608,10 +608,16 @@ log-view-diff-changeset
     (log-view-diff-common beg end t)))
 
 (defun log-view-diff-common (beg end &optional whole-changeset)
-  (let ((to (log-view-current-tag beg))
-        (fr (log-view-current-tag end)))
-    (when (string-equal fr to)
-      ;; TO and FR are the same, look at the previous revision.
+  (let* ((to (log-view-current-tag beg))
+         (fr-entry (log-view-current-entry end))
+         (fr (cadr fr-entry)))
+    ;; When TO and FR are the same, or when point is on a line after
+    ;; the last entry, look at the previous revision.
+    (when (or (string-equal fr to)
+              (>= (point)
+                  (save-excursion
+                    (goto-char (car fr-entry))
+                    (forward-line))))
       (setq fr (vc-call-backend log-view-vc-backend 'previous-revision nil fr)))
     (vc-diff-internal
      t (list log-view-vc-backend





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

* bug#28466: 26.0.50; diff in vc-outgoing doesn't work properly
  2017-09-16 21:53 ` Tom Tromey
@ 2017-09-19  0:39   ` Dmitry Gutov
  0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Gutov @ 2017-09-19  0:39 UTC (permalink / raw)
  To: Tom Tromey; +Cc: 28466

On 9/17/17 12:53 AM, Tom Tromey wrote:

> The appended patch fixes this for me.
> I'll put it on the Emacs 26 branch after a few days, unless there are
> comments.

Makes sense to me, please feel free to commit.

I don't particularly like how the region end is interpreted in this 
command, though. I'd be more comfortable with the semantics of "show the 
contents of all these revisions combined", which means replacing the 
condition with t. Something to think about, for some future version.





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

* bug#28466: doneu
  2017-09-15  4:34 bug#28466: 26.0.50; diff in vc-outgoing doesn't work properly Tom Tromey
  2017-09-16 21:53 ` Tom Tromey
@ 2017-09-19  2:17 ` Tom Tromey
  1 sibling, 0 replies; 4+ messages in thread
From: Tom Tromey @ 2017-09-19  2:17 UTC (permalink / raw)
  To: 28466-done

Fix checked in.

Tom





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

end of thread, other threads:[~2017-09-19  2:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-15  4:34 bug#28466: 26.0.50; diff in vc-outgoing doesn't work properly Tom Tromey
2017-09-16 21:53 ` Tom Tromey
2017-09-19  0:39   ` Dmitry Gutov
2017-09-19  2:17 ` bug#28466: doneu Tom Tromey

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