;;; vc-hooks.el --- resident support for version-control
;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-;; 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;; 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+;; Free Software Foundation, Inc.
;; Author: FSF (see vc.el for full credits)
;; Maintainer: Andre Spiegel <spiegel@gnu.org>
;; Tell Emacs about this new kind of minor mode
;; (add-to-list 'minor-mode-alist '(vc-mode vc-mode))
+;; Autoload if this file no longer dumped.
+(put 'vc-mode 'risky-local-variable t)
(make-variable-buffer-local 'vc-mode)
(put 'vc-mode 'permanent-local t)
"Return the name under which the user accesses the given FILE."
(or (and (eq (string-match tramp-file-name-regexp file) 0)
;; tramp case: execute "whoami" via tramp
- (let ((default-directory (file-name-directory file)))
+ (let ((default-directory (file-name-directory file))
+ process-file-side-effects)
(with-temp-buffer
(if (not (zerop (process-file "whoami" nil t)))
;; fall through if "whoami" didn't work
on version-controlled buffer."
(interactive "P")
(if (vc-backend buffer-file-name)
- (error "Toggling the readability of a version controlled file is likely to wreak havoc.")
+ (error "Toggling the readability of a version controlled file is likely to wreak havoc")
(toggle-read-only)))
(defun vc-default-make-version-backups-p (backend file)
(define-key map "h" 'vc-insert-headers)
(define-key map "i" 'vc-register)
(define-key map "l" 'vc-print-log)
+ (define-key map "L" 'vc-print-root-log)
(define-key map "m" 'vc-merge)
(define-key map "r" 'vc-retrieve-tag)
(define-key map "s" 'vc-create-tag)
(define-key map "v" 'vc-next-action)
(define-key map "+" 'vc-update)
(define-key map "=" 'vc-diff)
+ (define-key map "D" 'vc-root-diff)
(define-key map "~" 'vc-revision-other-window)
map))
(fset 'vc-prefix-map vc-prefix-map)
(define-key map [vc-diff]
'(menu-item "Compare with Base Version" vc-diff
:help "Compare file set with the base version"))
+ (define-key map [vc-root-diff]
+ '(menu-item "Compare Tree with Base Version" vc-root-diff
+ :help "Compare current tree with the base version"))
(define-key map [vc-update-change-log]
'(menu-item "Update ChangeLog" vc-update-change-log
:help "Find change log file and add entries from recent version control logs"))
(define-key map [vc-print-log]
'(menu-item "Show History" vc-print-log
:help "List the change log of the current file set in a window"))
+ (define-key map [vc-print-root-log]
+ '(menu-item "Show Top of the Tree History " vc-print-root-log
+ :help "List the change log for the current tree in a window"))
(define-key map [separator2] '("----"))
(define-key map [vc-insert-header]
'(menu-item "Insert Header" vc-insert-headers