]> git.eshelyaron.com Git - emacs.git/commitdiff
(vc-bzr-working-revision): Recognize a newer branch
authorDan Nicolaescu <dann@ics.uci.edu>
Wed, 4 Feb 2009 07:32:51 +0000 (07:32 +0000)
committerDan Nicolaescu <dann@ics.uci.edu>
Wed, 4 Feb 2009 07:32:51 +0000 (07:32 +0000)
format.  Use when instead of if.

lisp/ChangeLog
lisp/vc-bzr.el

index 9c806c616b91d0e103d7bbf897c548df7b87fee5..a15fca9ebd7d3d0b16afcd6062d41c778e8a3068 100644 (file)
@@ -1,3 +1,8 @@
+2009-02-04  Dan Nicolaescu  <dann@ics.uci.edu>
+
+       * vc-bzr.el (vc-bzr-working-revision): Recognize a newer branch
+       format.  Use when instead of if.
+
 2009-02-04  Miles Bader  <miles@gnu.org>
 
        * emacs-lisp/lisp.el (forward-sexp, backward-sexp, forward-list)
index f04eb3da5918133611ccc7dcf96180a4fcfe0146..5c8b50bc191a10d334dca28196864499a4d3a7ed 100644 (file)
@@ -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