Mercurial > emacs
comparison lisp/vc-arch.el @ 78359:2dd5d799a16d
* vc-git.el: (vc-directory-exclusion-list, vc-handled-backends):
Remove.
(vc-git-revision-completion-table): Enable.
* vc-hooks.el (vc-handled-backends): Add GIT and HG.
* vc.el (vc-directory-exclusion-list): Add .git and .hg.
* vc-hg.el (vc-hg-revision-completion-table): Re-enable.
* diff-mode.el (diff-mode-menu): New entries.
* diff-mode.el (diff-beginning-of-file-and-junk): New function.
(diff-file-kill): Use it.
(diff-beginning-of-hunk): Add arg `try-harder' using it.
(diff-restrict-view, diff-find-source-location, diff-refine-hunk):
Use it so they find the hunk even when we're in the file header.
* vc.el: Add new VC operation `revision-completion-table'.
(vc-default-revision-completion-table): New function.
(vc-version-diff, vc-version-other-window): Use it to provide
completion of revision names if the backend provides it.
* vc-arch.el (vc-arch--version-completion-table)
(vc-arch-revision-completion-table): New functions to provide
completion of revision names.
* vc-cvs.el: Require CL.
(vc-cvs-revision-table, vc-cvs-revision-completion-table):
New functions to provide completion of revision names.
* eval.c (init_eval_once): Bump max_lisp_eval_depth to 400.
* vc2-xtra.texi (Customizing VC): Add GIT and HG.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Mon, 30 Jul 2007 00:19:06 +0000 |
parents | 9355f9b7bbff |
children | 1926a08e8926 |
comparison
equal
deleted
inserted
replaced
78358:9b7f2e8baaeb | 78359:2dd5d799a16d |
---|---|
417 "A wrapper around `vc-do-command' for use in vc-arch.el." | 417 "A wrapper around `vc-do-command' for use in vc-arch.el." |
418 (apply 'vc-do-command buffer okstatus vc-arch-command file flags)) | 418 (apply 'vc-do-command buffer okstatus vc-arch-command file flags)) |
419 | 419 |
420 (defun vc-arch-init-version () nil) | 420 (defun vc-arch-init-version () nil) |
421 | 421 |
422 ;;; Completion of versions and revisions. | |
423 | |
424 (defun vc-arch--version-completion-table (root string) | |
425 (delq nil | |
426 (mapcar | |
427 (lambda (d) | |
428 (when (string-match "/\\([^/]+\\)/\\([^/]+\\)\\'" d) | |
429 (concat (match-string 2 d) "/" (match-string 1 d)))) | |
430 (let ((default-directory root)) | |
431 (file-expand-wildcards | |
432 (concat "*/*/" | |
433 (if (string-match "/" string) | |
434 (concat (substring string (match-end 0)) | |
435 "*/" (substring string 0 (match-beginning 0))) | |
436 (concat "*/" string)) | |
437 "*")))))) | |
438 | |
439 (defun vc-arch-revision-completion-table (file) | |
440 (lexical-let ((file file)) | |
441 (lambda (string pred action) | |
442 ;; FIXME: complete revision patches as well. | |
443 (let* ((root (expand-file-name "{arch}" (vc-arch-root file))) | |
444 (table (vc-arch--version-completion-table root string))) | |
445 (complete-with-action action table string pred))))) | |
446 | |
422 ;;; Less obvious implementations. | 447 ;;; Less obvious implementations. |
423 | 448 |
424 (defun vc-arch-find-version (file rev buffer) | 449 (defun vc-arch-find-version (file rev buffer) |
425 (let ((out (make-temp-file "vc-out"))) | 450 (let ((out (make-temp-file "vc-out"))) |
426 (unwind-protect | 451 (unwind-protect |