diff options
| author | Dan Nicolaescu | 2009-02-04 07:32:51 +0000 |
|---|---|---|
| committer | Dan Nicolaescu | 2009-02-04 07:32:51 +0000 |
| commit | 6510501067147f718abc89f48d3d40950c4a353e (patch) | |
| tree | d5f2e8aea7de577f632cf239d645c7a41a8006fe | |
| parent | 61eee794dba0de5906d8b0aef30cc98e634b3b2d (diff) | |
| download | emacs-6510501067147f718abc89f48d3d40950c4a353e.tar.gz emacs-6510501067147f718abc89f48d3d40950c4a353e.zip | |
(vc-bzr-working-revision): Recognize a newer branch
format. Use when instead of if.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/vc-bzr.el | 8 |
2 files changed, 10 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9c806c616b9..a15fca9ebd7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2009-02-04 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 2 | |||
| 3 | * vc-bzr.el (vc-bzr-working-revision): Recognize a newer branch | ||
| 4 | format. Use when instead of if. | ||
| 5 | |||
| 1 | 2009-02-04 Miles Bader <miles@gnu.org> | 6 | 2009-02-04 Miles Bader <miles@gnu.org> |
| 2 | 7 | ||
| 3 | * emacs-lisp/lisp.el (forward-sexp, backward-sexp, forward-list) | 8 | * 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." | |||
| 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 |