Mercurial > emacs
comparison lisp/vc-bzr.el @ 92884:62bd4693326e
(vc-bzr-log-view-mode): "." can be part of a revno.
(vc-bzr-show-log-entry): Make regexp match more cases.
(vc-diff-switches-list): Remove autoload, not needed.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Fri, 14 Mar 2008 01:52:59 +0000 |
parents | 7071cfe2789e |
children | 89f7b102ea85 |
comparison
equal
deleted
inserted
replaced
92883:150cdc89c68b | 92884:62bd4693326e |
---|---|
376 (remove-hook 'log-view-mode-hook 'vc-bzr-log-view-mode) ;Deactivate the hack. | 376 (remove-hook 'log-view-mode-hook 'vc-bzr-log-view-mode) ;Deactivate the hack. |
377 (require 'add-log) | 377 (require 'add-log) |
378 ;; Don't have file markers, so use impossible regexp. | 378 ;; Don't have file markers, so use impossible regexp. |
379 (set (make-local-variable 'log-view-file-re) "\\'\\`") | 379 (set (make-local-variable 'log-view-file-re) "\\'\\`") |
380 (set (make-local-variable 'log-view-message-re) | 380 (set (make-local-variable 'log-view-message-re) |
381 "^ *-+\n *\\(?:revno: \\([0-9]+\\)\\|merged: .+\\)") | 381 "^ *-+\n *\\(?:revno: \\([0-9.]+\\)\\|merged: .+\\)") |
382 (set (make-local-variable 'log-view-font-lock-keywords) | 382 (set (make-local-variable 'log-view-font-lock-keywords) |
383 ;; log-view-font-lock-keywords is careful to use the buffer-local | 383 ;; log-view-font-lock-keywords is careful to use the buffer-local |
384 ;; value of log-view-message-re only since Emacs-23. | 384 ;; value of log-view-message-re only since Emacs-23. |
385 (append `((,log-view-message-re . 'log-view-message-face)) | 385 (append `((,log-view-message-re . 'log-view-message-face)) |
386 ;; log-view-font-lock-keywords | 386 ;; log-view-font-lock-keywords |
406 | 406 |
407 (defun vc-bzr-show-log-entry (revision) | 407 (defun vc-bzr-show-log-entry (revision) |
408 "Find entry for patch name REVISION in bzr change log buffer." | 408 "Find entry for patch name REVISION in bzr change log buffer." |
409 (goto-char (point-min)) | 409 (goto-char (point-min)) |
410 (let (case-fold-search) | 410 (let (case-fold-search) |
411 (if (re-search-forward (concat "^-+\nrevno: " revision "$") nil t) | 411 (if (re-search-forward |
412 ;; "revno:" can appear either at the beginning of a line, or indented. | |
413 (concat "^[ ]*-+\n[ ]*revno: " | |
414 ;; The revision can contain ".", quote it so that it | |
415 ;; does not interfere with regexp matching. | |
416 (regexp-quote revision) "$") nil t) | |
412 (beginning-of-line 0) | 417 (beginning-of-line 0) |
413 (goto-char (point-min))))) | 418 (goto-char (point-min))))) |
414 | |
415 (autoload 'vc-diff-switches-list "vc" nil nil t) | |
416 | 419 |
417 (defun vc-bzr-diff (files &optional rev1 rev2 buffer) | 420 (defun vc-bzr-diff (files &optional rev1 rev2 buffer) |
418 "VC bzr backend for diff." | 421 "VC bzr backend for diff." |
419 ;; `bzr diff' exits with code 1 if diff is non-empty | 422 ;; `bzr diff' exits with code 1 if diff is non-empty |
420 (apply #'vc-bzr-command "diff" (or buffer "*vc-diff*") 1 files | 423 (apply #'vc-bzr-command "diff" (or buffer "*vc-diff*") 1 files |