From 70620cbe32b2623da09c904cc4d17652747c029d Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Sat, 12 Mar 2011 16:26:33 +0100 Subject: [PATCH] lisp/vc/vc-bzr.el (vc-bzr-state): Handle bzr 2.3.0 (follow-up to bug#8170). --- lisp/ChangeLog | 4 ++++ lisp/vc/vc-bzr.el | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cb7272ded58..429a86ad0e4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -6,6 +6,10 @@ * net/trampver.el: Update release number. +2011-03-12 Juanma Barranquero + + * vc/vc-bzr.el (vc-bzr-state): Handle bzr 2.3.0 (follow-up to bug#8170). + 2011-03-12 Stefan Monnier * progmodes/compile.el (compilation--previous-directory): Fix up diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el index a0a16601ed7..21cb86a9840 100644 --- a/lisp/vc/vc-bzr.el +++ b/lisp/vc/vc-bzr.el @@ -435,8 +435,13 @@ If any error occurred in running `bzr status', then return nil." (defun vc-bzr-state (file) (lexical-let ((result (vc-bzr-status file))) (when (consp result) - (when (cdr result) - (message "Warnings in `bzr' output: %s" (cdr result))) + (let ((warnings (cdr result))) + (when warnings + ;; bzr 2.3.0 returns info about shelves, which is not really a warning + (when (string-match "[1-9]+ shel\\(f\\|ves\\) exists?\\..*?\n" warnings) + (setq warnings (replace-match "" nil nil warnings))) + (unless (string= warnings "") + (message "Warnings in `bzr' output: %s" warnings)))) (cdr (assq (car result) '((added . added) (kindchanged . edited) -- 2.39.2