summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorAndré Spiegel <spiegel@gnu.org>1996-09-08 11:53:34 +0000
committerAndré Spiegel <spiegel@gnu.org>1996-09-08 11:53:34 +0000
commit6fbab1aad043cf0d2cbc29461afbbb9c6084390b (patch)
treef0a37e5a00b13f0e333234b873609b7dc0dbf71f /lisp
parentc1df58d3888127fc071fb7dbc72494004f8a029f (diff)
downloademacs-6fbab1aad043cf0d2cbc29461afbbb9c6084390b.tar.gz
(vc-file-owner): If the file is owned by somebody else, return the UID
as a string, so that the rest of VC can use it like a username.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/vc-hooks.el12
1 files changed, 4 insertions, 8 deletions
diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el
index 8a4184a6bad..095b16c69b7 100644
--- a/lisp/vc-hooks.el
+++ b/lisp/vc-hooks.el
@@ -570,18 +570,14 @@ For CVS, the full name of CVS/Entries is returned."
(defun vc-file-owner (file)
;; The expression below should return the username of the owner
;; of the file. It doesn't. It returns the username if it is
- ;; you, or otherwise the UID of the owner of the file. The
- ;; return value from this function is only used by
- ;; vc-dired-reformat-line, and it does the proper thing if a UID
- ;; is returned.
+ ;; you, or otherwise the UID of the owner of the file. The UID
+ ;; is returned as a string, so that the rest of VC doesn't notice
+ ;; the difference.
;; The *proper* way to fix this would be to implement a built-in
;; function in Emacs, say, (username UID), that returns the
;; username of a given UID.
- ;; The result of this hack is that vc-directory will print the
- ;; name of the owner of the file for any files that are
- ;; modified.
(let ((uid (nth 2 (file-attributes file))))
- (if (= uid (user-uid)) (user-login-name) uid)))
+ (if (= uid (user-uid)) (user-login-name) (number-to-string uid))))
(defun vc-rcs-lock-from-diff (file)
;; Diff the file against the master version. If differences are found,