[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/vc-hooks.el
From: |
Andre Spiegel |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/vc-hooks.el |
Date: |
Wed, 04 Sep 2002 16:45:35 -0400 |
Index: emacs/lisp/vc-hooks.el
diff -c emacs/lisp/vc-hooks.el:1.143 emacs/lisp/vc-hooks.el:1.144
*** emacs/lisp/vc-hooks.el:1.143 Fri Aug 23 09:23:14 2002
--- emacs/lisp/vc-hooks.el Wed Sep 4 16:45:34 2002
***************
*** 5,11 ****
;; Author: FSF (see vc.el for full credits)
;; Maintainer: Andre Spiegel <address@hidden>
! ;; $Id: vc-hooks.el,v 1.143 2002/08/23 13:23:14 spiegel Exp $
;; This file is part of GNU Emacs.
--- 5,11 ----
;; Author: FSF (see vc.el for full credits)
;; Maintainer: Andre Spiegel <address@hidden>
! ;; $Id: vc-hooks.el,v 1.144 2002/09/04 20:45:34 spiegel Exp $
;; This file is part of GNU Emacs.
***************
*** 34,39 ****
--- 34,40 ----
;;; Code:
(eval-when-compile
+ (require 'vc)
(require 'cl))
;; Customization Variables (the rest is in vc.el)
***************
*** 382,387 ****
--- 383,403 ----
and does not employ any heuristic at all."
(vc-call-backend backend 'state file))
+ (defun vc-workfile-unchanged-p (file)
+ "Return non-nil if FILE has not changed since the last checkout."
+ (let ((checkout-time (vc-file-getprop file 'vc-checkout-time))
+ (lastmod (nth 5 (file-attributes file))))
+ (if checkout-time
+ (equal checkout-time lastmod)
+ (let ((unchanged (vc-call workfile-unchanged-p file)))
+ (vc-file-setprop file 'vc-checkout-time (if unchanged lastmod 0))
+ unchanged))))
+
+ (defun vc-default-workfile-unchanged-p (backend file)
+ "Check if FILE is unchanged by diffing against the master version.
+ Return non-nil if FILE is unchanged."
+ (zerop (vc-call diff file (vc-workfile-version file))))
+
(defun vc-workfile-version (file)
"Return the version level of the current workfile FILE.
If FILE is not registered, this function always returns nil."
***************
*** 389,396 ****
(if (vc-backend file)
(vc-file-setprop file 'vc-workfile-version
(vc-call workfile-version file)))))
-
- ;;; actual version-control code starts here
(defun vc-default-registered (backend file)
"Check if FILE is registered in BACKEND using vc-BACKEND-master-templates."
--- 405,410 ----
- [Emacs-diffs] Changes to emacs/lisp/vc-hooks.el,
Andre Spiegel <=