From: Dan Nicolaescu Date: Wed, 4 Feb 2009 07:32:51 +0000 (+0000) Subject: (vc-bzr-working-revision): Recognize a newer branch X-Git-Tag: emacs-pretest-23.0.91~422 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6510501067147f718abc89f48d3d40950c4a353e;p=emacs.git (vc-bzr-working-revision): Recognize a newer branch format. Use when instead of if. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9c806c616b9..a15fca9ebd7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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 --git a/lisp/vc-bzr.el b/lisp/vc-bzr.el index f04eb3da591..5c8b50bc191 100644 --- a/lisp/vc-bzr.el +++ b/lisp/vc-bzr.el @@ -338,11 +338,13 @@ If any error occurred in running `bzr status', then return nil." ;; 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