diff options
| author | Stefan Monnier | 2008-03-14 19:38:46 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2008-03-14 19:38:46 +0000 |
| commit | 0e12ba6d61eed4f2fa95c273934003111908b61d (patch) | |
| tree | 521ffc49ecc3d65a2f085e35c27a65bff309e9fb | |
| parent | f14c33580dd759f188a99f068549739d57f51d2b (diff) | |
| download | emacs-0e12ba6d61eed4f2fa95c273934003111908b61d.tar.gz emacs-0e12ba6d61eed4f2fa95c273934003111908b61d.zip | |
(vc-bzr-registered): Fail if `bzr' is not installed.
(vc-bzr-annotate-command): Preserve line alignment.
(vc-bzr-annotate-time): Accept space used to preserve alignment.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/vc-bzr.el | 24 |
2 files changed, 21 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1b0026bfc21..89fecabe85f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2008-03-14 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * vc-bzr.el (vc-bzr-registered): Fail if `bzr' is not installed. | ||
| 4 | (vc-bzr-annotate-command): Preserve line alignment. | ||
| 5 | (vc-bzr-annotate-time): Accept space used to preserve alignment. | ||
| 6 | |||
| 1 | 2008-03-13 Richard Stallman <rms@gnu.org> | 7 | 2008-03-13 Richard Stallman <rms@gnu.org> |
| 2 | 8 | ||
| 3 | * mouse.el (mouse-yank-secondary): Nice error msg if no secondary sel. | 9 | * mouse.el (mouse-yank-secondary): Nice error msg if no secondary sel. |
diff --git a/lisp/vc-bzr.el b/lisp/vc-bzr.el index 7437cec4174..3f64247fc69 100644 --- a/lisp/vc-bzr.el +++ b/lisp/vc-bzr.el | |||
| @@ -146,13 +146,19 @@ running `vc-bzr-state'." | |||
| 146 | (vc-bzr-state file) ; Some other unknown format? | 146 | (vc-bzr-state file) ; Some other unknown format? |
| 147 | (let* ((relfile (file-relative-name file root)) | 147 | (let* ((relfile (file-relative-name file root)) |
| 148 | (reldir (file-name-directory relfile))) | 148 | (reldir (file-name-directory relfile))) |
| 149 | (re-search-forward | 149 | (when (re-search-forward |
| 150 | (concat "^\0" | 150 | (concat "^\0" |
| 151 | (if reldir (regexp-quote (directory-file-name reldir))) | 151 | (if reldir (regexp-quote |
| 152 | "\0" | 152 | (directory-file-name reldir))) |
| 153 | (regexp-quote (file-name-nondirectory relfile)) | 153 | "\0" |
| 154 | "\0") | 154 | (regexp-quote (file-name-nondirectory relfile)) |
| 155 | nil t))))))))) | 155 | "\0") |
| 156 | nil t) | ||
| 157 | ;; Make sure `bzr' agrees that this file is under Bzr's | ||
| 158 | ;; control. This is important because if `bzr' is not | ||
| 159 | ;; installed vc-find-file may otherwise get an error in | ||
| 160 | ;; the subsequent call to `vc-state'. | ||
| 161 | (vc-bzr-state file)))))))))) | ||
| 156 | 162 | ||
| 157 | (defconst vc-bzr-state-words | 163 | (defconst vc-bzr-state-words |
| 158 | "added\\|ignored\\|kind changed\\|modified\\|removed\\|renamed\\|unknown" | 164 | "added\\|ignored\\|kind changed\\|modified\\|removed\\|renamed\\|unknown" |
| @@ -430,7 +436,7 @@ property containing author and date information." | |||
| 430 | ;; to allow saving space by sharing the text properties. | 436 | ;; to allow saving space by sharing the text properties. |
| 431 | (setq vc-bzr-annotation-table (make-hash-table :test 'equal)) | 437 | (setq vc-bzr-annotation-table (make-hash-table :test 'equal)) |
| 432 | (goto-char (point-min)) | 438 | (goto-char (point-min)) |
| 433 | (while (re-search-forward "^\\( *[0-9]+\\) +\\(.+\\) +\\([0-9]\\{8\\}\\) |" | 439 | (while (re-search-forward "^\\( *[0-9]+ *\\) \\([^\n ]+\\) +\\([0-9]\\{8\\}\\) |" |
| 434 | nil t) | 440 | nil t) |
| 435 | (let* ((rev (match-string 1)) | 441 | (let* ((rev (match-string 1)) |
| 436 | (author (match-string 2)) | 442 | (author (match-string 2)) |
| @@ -446,7 +452,7 @@ property containing author and date information." | |||
| 446 | (insert tag " |"))))) | 452 | (insert tag " |"))))) |
| 447 | 453 | ||
| 448 | (defun vc-bzr-annotate-time () | 454 | (defun vc-bzr-annotate-time () |
| 449 | (when (re-search-forward "^ *[0-9]+ |" nil t) | 455 | (when (re-search-forward "^ *[0-9]+ +|" nil t) |
| 450 | (let ((prop (get-text-property (line-beginning-position) 'help-echo))) | 456 | (let ((prop (get-text-property (line-beginning-position) 'help-echo))) |
| 451 | (string-match "[0-9]+\\'" prop) | 457 | (string-match "[0-9]+\\'" prop) |
| 452 | (vc-annotate-convert-time | 458 | (vc-annotate-convert-time |