comparison lisp/vc-bzr.el @ 101790:e98ddfaefcae

(vc-bzr-working-revision): Recognize a newer branch format. Use when instead of if.
author Dan Nicolaescu <dann@ics.uci.edu>
date Wed, 04 Feb 2009 07:32:51 +0000
parents 5f4e85fd7c0a
children acda56dde7fb
comparison
equal deleted inserted replaced
101789:7d131969b5e2 101790:e98ddfaefcae
336 (looking-at "Bazaar-NG branch, format 0.0.4") 336 (looking-at "Bazaar-NG branch, format 0.0.4")
337 (looking-at "Bazaar-NG branch format 5")) 337 (looking-at "Bazaar-NG branch format 5"))
338 ;; count lines in .bzr/branch/revision-history 338 ;; count lines in .bzr/branch/revision-history
339 (insert-file-contents revhistory-file) 339 (insert-file-contents revhistory-file)
340 (number-to-string (count-lines (line-end-position) (point-max)))) 340 (number-to-string (count-lines (line-end-position) (point-max))))
341 ((looking-at "Bazaar Branch Format 6 (bzr 0.15)") 341 ((or
342 (looking-at "Bazaar Branch Format 6 (bzr 0.15)")
343 (looking-at "Bazaar Branch Format 7 (needs bzr 1.6)"))
342 ;; revno is the first number in .bzr/branch/last-revision 344 ;; revno is the first number in .bzr/branch/last-revision
343 (insert-file-contents lastrev-file) 345 (insert-file-contents lastrev-file)
344 (if (re-search-forward "[0-9]+" nil t) 346 (when (re-search-forward "[0-9]+" nil t)
345 (buffer-substring (match-beginning 0) (match-end 0)))))) 347 (buffer-substring (match-beginning 0) (match-end 0))))))
346 ;; fallback to calling "bzr revno" 348 ;; fallback to calling "bzr revno"
347 (lexical-let* 349 (lexical-let*
348 ((result (vc-bzr-command-discarding-stderr 350 ((result (vc-bzr-command-discarding-stderr
349 vc-bzr-program "revno" (file-relative-name file))) 351 vc-bzr-program "revno" (file-relative-name file)))
350 (exitcode (car result)) 352 (exitcode (car result))