Mercurial > emacs
comparison lisp/vc-bzr.el @ 98220:962e4709829b
* vc-bzr.el (vc-bzr-show-log-entry):
* vc-git.el (vc-git-show-log-entry): Deal with a nil argument,
C-x v l for a directory uses that.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Thu, 18 Sep 2008 17:01:41 +0000 |
parents | 9fc5b62e3967 |
children | 75e08f08f5e5 |
comparison
equal
deleted
inserted
replaced
98219:bc71ea30073c | 98220:962e4709829b |
---|---|
466 vc-bzr-log-switches)))))) | 466 vc-bzr-log-switches)))))) |
467 | 467 |
468 (defun vc-bzr-show-log-entry (revision) | 468 (defun vc-bzr-show-log-entry (revision) |
469 "Find entry for patch name REVISION in bzr change log buffer." | 469 "Find entry for patch name REVISION in bzr change log buffer." |
470 (goto-char (point-min)) | 470 (goto-char (point-min)) |
471 (let (case-fold-search) | 471 (when revision |
472 (if (re-search-forward | 472 (let (case-fold-search) |
473 ;; "revno:" can appear either at the beginning of a line, or indented. | 473 (if (re-search-forward |
474 (concat "^[ ]*-+\n[ ]*revno: " | 474 ;; "revno:" can appear either at the beginning of a line, |
475 ;; The revision can contain ".", quote it so that it | 475 ;; or indented. |
476 ;; does not interfere with regexp matching. | 476 (concat "^[ ]*-+\n[ ]*revno: " |
477 (regexp-quote revision) "$") nil t) | 477 ;; The revision can contain ".", quote it so that it |
478 (beginning-of-line 0) | 478 ;; does not interfere with regexp matching. |
479 (goto-char (point-min))))) | 479 (regexp-quote revision) "$") nil t) |
480 (beginning-of-line 0) | |
481 (goto-char (point-min)))))) | |
480 | 482 |
481 (defun vc-bzr-diff (files &optional rev1 rev2 buffer) | 483 (defun vc-bzr-diff (files &optional rev1 rev2 buffer) |
482 "VC bzr backend for diff." | 484 "VC bzr backend for diff." |
483 ;; `bzr diff' exits with code 1 if diff is non-empty. | 485 ;; `bzr diff' exits with code 1 if diff is non-empty. |
484 (apply #'vc-bzr-command "diff" (or buffer "*vc-diff*") 'async files | 486 (apply #'vc-bzr-command "diff" (or buffer "*vc-diff*") 'async files |