aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorAndré Spiegel1996-09-08 11:53:34 +0000
committerAndré Spiegel1996-09-08 11:53:34 +0000
commit79bdae7a236f6ec3423282da13e20b1ecc25bf04 (patch)
tree57182868f5338f829ec3500aa5fdc0a145aa3aa6 /lisp
parent6dfe5fe02d27ef3bee4e66fab056cfb02bba1247 (diff)
downloademacs-79bdae7a236f6ec3423282da13e20b1ecc25bf04.tar.gz
emacs-79bdae7a236f6ec3423282da13e20b1ecc25bf04.zip
(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."
570(defun vc-file-owner (file) 570(defun vc-file-owner (file)
571 ;; The expression below should return the username of the owner 571 ;; The expression below should return the username of the owner
572 ;; of the file. It doesn't. It returns the username if it is 572 ;; of the file. It doesn't. It returns the username if it is
573 ;; you, or otherwise the UID of the owner of the file. The 573 ;; you, or otherwise the UID of the owner of the file. The UID
574 ;; return value from this function is only used by 574 ;; is returned as a string, so that the rest of VC doesn't notice
575 ;; vc-dired-reformat-line, and it does the proper thing if a UID 575 ;; the difference.
576 ;; is returned.
577 ;; The *proper* way to fix this would be to implement a built-in 576 ;; The *proper* way to fix this would be to implement a built-in
578 ;; function in Emacs, say, (username UID), that returns the 577 ;; function in Emacs, say, (username UID), that returns the
579 ;; username of a given UID. 578 ;; username of a given UID.
580 ;; The result of this hack is that vc-directory will print the
581 ;; name of the owner of the file for any files that are
582 ;; modified.
583 (let ((uid (nth 2 (file-attributes file)))) 579 (let ((uid (nth 2 (file-attributes file))))
584 (if (= uid (user-uid)) (user-login-name) uid))) 580 (if (= uid (user-uid)) (user-login-name) (number-to-string uid))))
585 581
586(defun vc-rcs-lock-from-diff (file) 582(defun vc-rcs-lock-from-diff (file)
587 ;; Diff the file against the master version. If differences are found, 583 ;; Diff the file against the master version. If differences are found,