]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/vc/vc-bzr.el (vc-bzr-incoming-revision): New function.
authorSean Whitton <spwhitton@spwhitton.name>
Sun, 1 Jun 2025 15:21:04 +0000 (15:21 +0000)
committerEshel Yaron <me@eshelyaron.com>
Sat, 7 Jun 2025 19:59:20 +0000 (21:59 +0200)
(cherry picked from commit 34e03d198e19cfe065e85f2b77fc13182deada8f)

lisp/vc/vc-bzr.el

index 513052b37b00a9018fbaebcb4179f7759512e383..0fcc88836a15bf8131e3a80817d44268e0e77888 100644 (file)
@@ -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."