# HG changeset patch # User Dan Nicolaescu # Date 1233732771 0 # Node ID e98ddfaefcae7abc7ff80faa45fb6f77ed493b56 # Parent 7d131969b5e278ecd6cb3139f3719f12328f8992 (vc-bzr-working-revision): Recognize a newer branch format. Use when instead of if. diff -r 7d131969b5e2 -r e98ddfaefcae lisp/ChangeLog --- a/lisp/ChangeLog Wed Feb 04 05:48:16 2009 +0000 +++ b/lisp/ChangeLog Wed Feb 04 07:32:51 2009 +0000 @@ -1,3 +1,8 @@ +2009-02-04 Dan Nicolaescu + + * vc-bzr.el (vc-bzr-working-revision): Recognize a newer branch + format. Use when instead of if. + 2009-02-04 Miles Bader * emacs-lisp/lisp.el (forward-sexp, backward-sexp, forward-list) diff -r 7d131969b5e2 -r e98ddfaefcae lisp/vc-bzr.el --- a/lisp/vc-bzr.el Wed Feb 04 05:48:16 2009 +0000 +++ b/lisp/vc-bzr.el Wed Feb 04 07:32:51 2009 +0000 @@ -338,11 +338,13 @@ ;; count lines in .bzr/branch/revision-history (insert-file-contents revhistory-file) (number-to-string (count-lines (line-end-position) (point-max)))) - ((looking-at "Bazaar Branch Format 6 (bzr 0.15)") + ((or + (looking-at "Bazaar Branch Format 6 (bzr 0.15)") + (looking-at "Bazaar Branch Format 7 (needs bzr 1.6)")) ;; revno is the first number in .bzr/branch/last-revision (insert-file-contents lastrev-file) - (if (re-search-forward "[0-9]+" nil t) - (buffer-substring (match-beginning 0) (match-end 0)))))) + (when (re-search-forward "[0-9]+" nil t) + (buffer-substring (match-beginning 0) (match-end 0)))))) ;; fallback to calling "bzr revno" (lexical-let* ((result (vc-bzr-command-discarding-stderr