From f949172f77d03bf181bfe94b6bcf4f51e90aa29a Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sun, 1 Jun 2025 15:21:04 +0000 Subject: [PATCH] * lisp/vc/vc-bzr.el (vc-bzr-incoming-revision): New function. (cherry picked from commit 34e03d198e19cfe065e85f2b77fc13182deada8f) --- lisp/vc/vc-bzr.el | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el index 513052b37b0..0fcc88836a1 100644 --- a/lisp/vc/vc-bzr.el +++ b/lisp/vc/vc-bzr.el @@ -818,11 +818,24 @@ If LIMIT is non-nil, show no more than this many entries." (defun vc-bzr-log-incoming (buffer remote-location) (apply #'vc-bzr-command "missing" buffer 'async nil - (list "--theirs-only" (unless (string= remote-location "") remote-location)))) + (list "--theirs-only" (and (not (string-empty-p remote-location)) + remote-location)))) + +(defun vc-bzr-incoming-revision (remote-location) + (let* ((output + (with-output-to-string + (vc-bzr-command "missing" standard-output 1 nil + "--log-format=long" "--show-ids" + "--theirs-only" "-r-1.." + (and (not (string-empty-p remote-location)) + remote-location))))) + (and (string-match "^revision-id: \\(.+\\)$" output) + (concat "revid:" (match-string 1 output))))) (defun vc-bzr-log-outgoing (buffer remote-location) (apply #'vc-bzr-command "missing" buffer 'async nil - (list "--mine-only" (unless (string= remote-location "") remote-location)))) + (list "--mine-only" (and (not (string-empty-p remote-location)) + remote-location)))) (defun vc-bzr-show-log-entry (revision) "Find entry for patch name REVISION in bzr change log buffer." -- 2.39.5