]> code.delx.au - gnu-emacs/blobdiff - lisp/vc-rcs.el
(enum event_kind) [MAC_OS]: Update comment for MAC_APPLE_EVENT.
[gnu-emacs] / lisp / vc-rcs.el
index 71bdc73e792d6d765c358a98fb44aa6a4fabb223..00700c5a6520014c20e5cfca9d48e3b07ffcebeb 100644 (file)
@@ -1,7 +1,7 @@
 ;;; vc-rcs.el --- support for RCS version-control
 
-;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-;;   2000, 2001, 2004  Free Software Foundation, Inc.
+;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+;;   2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 
 ;; Author:     FSF (see vc.el for full credits)
 ;; Maintainer: Andre Spiegel <spiegel@gnu.org>
@@ -22,8 +22,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
@@ -152,8 +152,8 @@ For a description of possible values, see `vc-check-master-templates'."
                 (vc-file-setprop file 'vc-checkout-model 'locking))))
           state)
       (if (not (vc-mistrust-permissions file))
-          (let* ((attributes  (file-attributes file))
-                 (owner-uid   (nth 2 attributes))
+          (let* ((attributes  (file-attributes file 'string))
+                 (owner-name  (nth 2 attributes))
                  (permissions (nth 8 attributes)))
             (cond ((string-match ".r-..-..-." permissions)
                    (vc-file-setprop file 'vc-checkout-model 'locking)
@@ -162,7 +162,7 @@ For a description of possible values, see `vc-check-master-templates'."
                   (if (eq (vc-checkout-model file) 'locking)
                       (if (file-ownership-preserved-p file)
                           'edited
-                        (vc-user-login-name owner-uid))
+                        owner-name)
                     (if (vc-rcs-workfile-is-newer file)
                         'edited
                       'up-to-date)))
@@ -500,6 +500,7 @@ Needs RCS 5.6.2 or later for -M."
 (defun vc-rcs-annotate-command (file buffer &optional revision)
   "Annotate FILE, inserting the results in BUFFER.
 Optional arg REVISION is a revision to annotate from."
+  (vc-setup-buffer buffer)
   ;; Aside from the "head revision on the trunk", the instructions for
   ;; each revision on the trunk are an ordered list of kill and insert
   ;; commands necessary to go from the chronologically-following
@@ -817,7 +818,7 @@ file."
             'needs-patch))
         ;; locked by the calling user
         ((and (stringp locking-user)
-              (string= locking-user (vc-user-login-name)))
+              (string= locking-user (vc-user-login-name file)))
          (if (or (eq (vc-checkout-model file) 'locking)
                  workfile-is-latest
                  (vc-rcs-latest-on-branch-p file workfile-version))
@@ -906,7 +907,8 @@ Returns: nil            if no headers were found
          (vc-file-setprop file 'vc-state
                           (cond
                            ((eq locking-user 'none) 'up-to-date)
-                           ((string= locking-user (vc-user-login-name)) 'edited)
+                           ((string= locking-user (vc-user-login-name file)) 
+                             'edited)
                            (t locking-user)))
          ;; If the file has headers, we don't want to query the
          ;; master file, because that would eliminate all the