emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/vc-hooks.el


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/vc-hooks.el
Date: Thu, 08 May 2003 13:45:08 -0400

Index: emacs/lisp/vc-hooks.el
diff -c emacs/lisp/vc-hooks.el:1.149 emacs/lisp/vc-hooks.el:1.150
*** emacs/lisp/vc-hooks.el:1.149        Wed May  7 13:22:28 2003
--- emacs/lisp/vc-hooks.el      Thu May  8 13:45:08 2003
***************
*** 5,11 ****
  ;; Author:     FSF (see vc.el for full credits)
  ;; Maintainer: Andre Spiegel <address@hidden>
  
! ;; $Id: vc-hooks.el,v 1.149 2003/05/07 17:22:28 monnier 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.150 2003/05/08 17:45:08 monnier Exp $
  
  ;; This file is part of GNU Emacs.
  
***************
*** 370,375 ****
--- 370,381 ----
                       with locking; it represents an erroneous condition that
                       should be resolved by the user (vc-next-action will
                       prompt the user to do it)."
+   ;; FIXME: New (sub)states needed (?):
+   ;; - `added' (i.e. `edited' but with no base version yet,
+   ;;            typically represented by vc-workfile-version = "0")
+   ;; - `conflict' (i.e. `edited' with conflict markers)
+   ;; - `removed'
+   ;; - `copied' and `moved' (might be handled by `removed' and `added')
    (or (vc-file-getprop file 'vc-state)
        (if (vc-backend file)
            (vc-file-setprop file 'vc-state
***************
*** 398,404 ****
  (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.
--- 404,411 ----
  (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."
!   ;; If rev1 is nil, `diff' uses the current workfile version.
!   (zerop (vc-call diff file)))
  
  (defun vc-workfile-version (file)
    "Return the version level of the current workfile FILE.
***************
*** 583,591 ****
        ;; If the user is root, and the file is not owner-writable,
        ;; then pretend that we can't write it
        ;; even though we can (because root can write anything).
!       ;; This way, even root cannot modify a file that isn't locked.
!       (and (equal file buffer-file-name)
!          (not buffer-read-only)
           (zerop (user-real-uid))
           (zerop (logand (file-modes buffer-file-name) 128))
           (setq buffer-read-only t)))
--- 590,598 ----
        ;; If the user is root, and the file is not owner-writable,
        ;; then pretend that we can't write it
        ;; even though we can (because root can write anything).
!     ;; This way, even root cannot modify a file that isn't locked.
!     (and (equal file buffer-file-name)
!        (not buffer-read-only)
           (zerop (user-real-uid))
           (zerop (logand (file-modes buffer-file-name) 128))
           (setq buffer-read-only t)))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]