mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-05 22:20:24 -08:00
Compare commits
2 commits
b0a0127880
...
df4d8c1475
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
df4d8c1475 | ||
|
|
7780ac923c |
1 changed files with 19 additions and 13 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
|
||||
;; else cherry-picks the very same commits that you have outstanding,
|
||||
;; and pushes them. Given this, we implement our own caching.
|
||||
(or (and (not refresh)
|
||||
(cdr (assoc upstream-location
|
||||
(vc--repo-getprop 'vc-incoming-revision))))
|
||||
(and-let* ((res (vc-call-backend backend 'incoming-revision
|
||||
upstream-location refresh)))
|
||||
(if-let* ((alist (vc--repo-getprop 'vc-incoming-revision)))
|
||||
(setf (alist-get upstream-location alist nil nil #'equal)
|
||||
res)
|
||||
(vc--repo-setprop 'vc-incoming-revision
|
||||
`((,upstream-location . ,res))))
|
||||
res)
|
||||
(user-error "No incoming revision -- local-only branch?")))
|
||||
;;
|
||||
;; Do store `nil', before signalling an error, if there is no incoming
|
||||
;; revision, because that's also something that can be slow to
|
||||
;; determine and so should be remembered.
|
||||
(if-let* ((_ (not refresh))
|
||||
(record (assoc upstream-location
|
||||
(vc--repo-getprop 'vc-incoming-revision))))
|
||||
(cdr record)
|
||||
(let ((res (vc-call-backend backend 'incoming-revision
|
||||
upstream-location refresh)))
|
||||
(if-let* ((alist (vc--repo-getprop 'vc-incoming-revision)))
|
||||
(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
|
||||
(defun vc-log-incoming (&optional upstream-location)
|
||||
|
|
@ -4272,7 +4277,8 @@ It also signals an error in a Bazaar bound branch."
|
|||
(progn (vc-call-backend backend 'push arg)
|
||||
;; FIXME: Ideally we would only clear out the
|
||||
;; REMOTE-LOCATION to which we are pushing.
|
||||
(vc--repo-setprop 'vc-incoming-revision nil))
|
||||
(vc-run-delayed
|
||||
(vc--repo-setprop 'vc-incoming-revision nil)))
|
||||
(user-error "VC push is unsupported for `%s'" backend))))
|
||||
|
||||
;;;###autoload
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue