mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
* lisp/vc/vc.el (vc--incoming-revision): Do store 'nil'.
This commit is contained in:
parent
b0a0127880
commit
7780ac923c
1 changed files with 17 additions and 12 deletions
|
|
@ -4026,18 +4026,23 @@ The command prompts for the branch whose change log to show."
|
||||||
;; incoming revision is fine except for the rare case in which someone
|
;; incoming revision is fine except for the rare case in which someone
|
||||||
;; else cherry-picks the very same commits that you have outstanding,
|
;; else cherry-picks the very same commits that you have outstanding,
|
||||||
;; and pushes them. Given this, we implement our own caching.
|
;; and pushes them. Given this, we implement our own caching.
|
||||||
(or (and (not refresh)
|
;;
|
||||||
(cdr (assoc upstream-location
|
;; Do store `nil', before signalling an error, if there is no incoming
|
||||||
(vc--repo-getprop 'vc-incoming-revision))))
|
;; revision, because that's also something that can be slow to
|
||||||
(and-let* ((res (vc-call-backend backend 'incoming-revision
|
;; determine and so should be remembered.
|
||||||
upstream-location refresh)))
|
(if-let* ((_ (not refresh))
|
||||||
(if-let* ((alist (vc--repo-getprop 'vc-incoming-revision)))
|
(record (assoc upstream-location
|
||||||
(setf (alist-get upstream-location alist nil nil #'equal)
|
(vc--repo-getprop 'vc-incoming-revision))))
|
||||||
res)
|
(cdr record)
|
||||||
(vc--repo-setprop 'vc-incoming-revision
|
(let ((res (vc-call-backend backend 'incoming-revision
|
||||||
`((,upstream-location . ,res))))
|
upstream-location refresh)))
|
||||||
res)
|
(if-let* ((alist (vc--repo-getprop 'vc-incoming-revision)))
|
||||||
(user-error "No incoming revision -- local-only branch?")))
|
(setf (alist-get upstream-location alist nil nil #'equal)
|
||||||
|
res)
|
||||||
|
(vc--repo-setprop 'vc-incoming-revision
|
||||||
|
`((,upstream-location . ,res))))
|
||||||
|
(or res
|
||||||
|
(user-error "No incoming revision -- local-only branch?")))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun vc-log-incoming (&optional upstream-location)
|
(defun vc-log-incoming (&optional upstream-location)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue