;; -*- emacs-lisp -*- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; $Id: vc.el,v 1.11 2006/03/06 12:07:06 ole Exp $ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Version Control and Backup ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Version Control on single file basis ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (setq vc-command-messages nil) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Darcs ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'darcsum) (add-to-list 'vc-handled-backends 'DARCS) (autoload 'vc-darcs-find-file-hook "vc-darcs") (add-hook 'find-file-hooks 'vc-darcs-find-file-hook) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; SVN ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (autoload 'svn-status "psvn") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Special CVS handling ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; pcl-cvs (setq cvs-inhibit-copyright-message t) (setq cvs-auto-remove-handled nil) (setq cvs-auto-remove-handled-directories nil) (defun cvs-update-directory () "run cvs-update in directory of current buffer. " (interactive) (cvs-update (file-name-directory buffer-file-name) '("-d" "-P" "-l")) ) (defun cvs-update-directory-other-window () "run cvs-update in directory of current buffer. Output goes to other window." (interactive) (split-window) (cvs-update (file-name-directory buffer-file-name) '("-d" "-P" "-l")) ) (defun cvs-update-directory-recursive () "run cvs-update in directory of current buffer and below." (interactive) (cvs-update (file-name-directory buffer-file-name) '("-d" "-P")) ) (defun cvs-update-directory-recursive-other-window () "run cvs-update in directory of current buffer and below. Output goes to other window." (interactive) (split-window) (cvs-update (file-name-directory buffer-file-name) '("-d" "-P")) ) (defun cvs-examine-directory() "run cvs-examine in directory of current buffer." (interactive) (cvs-update (file-name-directory buffer-file-name) '("-d" "-P" "-l")) ) (defun cvs-examine-directory-other-window () "run cvs-examine in directory of current buffer. Output goes to other window." (interactive) (split-window) (cvs-update (file-name-directory buffer-file-name) '("-d" "-P" "-l")) ) (defun cvs-examine-directory-recursive () "run cvs-examine in directory of current buffer and below." (interactive) (cvs-update (file-name-directory buffer-file-name) '("-d" "-P")) ) (defun cvs-examine-directory-recursive-other-window () "run cvs-examine in directory of current buffer and below. Output goes to other window." (interactive) (split-window) (cvs-update (file-name-directory buffer-file-name) '("-d" "-P")) ) ;; bind cvs-update to the similar vc key (global-set-key [(control x) ?v (d)] 'cvs-update-directory) (global-set-key [(control x) ?v (control d)] 'cvs-update-directory-recursive) (global-set-key [(control x) ?4 ?v] 'cvs-update-directory-recursive-other-window) (global-set-key [(control x) ?v ?e] 'cvs-examine-directory) (global-set-key [(control x) ?v (control e)] 'cvs-examine-directory-recursive) (global-set-key [(control x) ?4 ?e] 'cvs-examine-directory-recursive-other-window) ;; list locked files (global-set-key [(control x) (v) (control l)] 'vc-directory) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Other CVS stuff ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'cvs-conflict nil t) (eval-after-load "cvs-conflict" '(progn (add-hook 'find-file-hooks 'cvs-conflict-detect) (add-hook 'after-revert-hook 'cvs-conflict-detect)))