]> git.eshelyaron.com Git - emacs.git/commitdiff
; vc-bzr-incoming-revision: Rewrite to match buffer text directly.
authorSean Whitton <spwhitton@spwhitton.name>
Wed, 4 Jun 2025 08:36:23 +0000 (08:36 +0000)
committerEshel Yaron <me@eshelyaron.com>
Sat, 7 Jun 2025 20:00:36 +0000 (22:00 +0200)
(cherry picked from commit e3472e8ec5852fb2b3f29c174a085b8f5b8f6f42)

lisp/vc/vc-bzr.el

index 0fcc88836a15bf8131e3a80817d44268e0e77888..f4a1978a40b7efc24f092afc81f333ad95528983 100644 (file)
@@ -822,15 +822,15 @@ If LIMIT is non-nil, show no more than this many entries."
                                     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)))))
+  (with-temp-buffer
+    (vc-bzr-command "missing" t 1 nil
+                    "--log-format=long" "--show-ids"
+                    "--theirs-only" "-r-1.."
+                    (and (not (string-empty-p remote-location))
+                        remote-location))
+    (goto-char (point-min))
+    (and (re-search-forward "^revision-id: " nil t)
+         (buffer-substring (point) (pos-eol)))))
 
 (defun vc-bzr-log-outgoing (buffer remote-location)
   (apply #'vc-bzr-command "missing" buffer 'async nil