summaryrefslogtreecommitdiff
path: root/lisp/vc-bzr.el
diff options
context:
space:
mode:
authorDan Nicolaescu <dann@ics.uci.edu>2009-02-04 07:32:51 +0000
committerDan Nicolaescu <dann@ics.uci.edu>2009-02-04 07:32:51 +0000
commit6510501067147f718abc89f48d3d40950c4a353e (patch)
treed5f2e8aea7de577f632cf239d645c7a41a8006fe /lisp/vc-bzr.el
parent61eee794dba0de5906d8b0aef30cc98e634b3b2d (diff)
downloademacs-6510501067147f718abc89f48d3d40950c4a353e.tar.gz
(vc-bzr-working-revision): Recognize a newer branch
format. Use when instead of if.
Diffstat (limited to 'lisp/vc-bzr.el')
-rw-r--r--lisp/vc-bzr.el8
1 files changed, 5 insertions, 3 deletions
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