changeset 4159:e0bddf2ba112

(vc-rcs-status): Omit "LOCKER:" if you are the locker.
author Paul Eggert <eggert@twinsun.com>
date Mon, 19 Jul 1993 04:03:52 +0000
parents 469c093061bf
children 4c4910d66232
files lisp/vc-hooks.el
diffstat 1 files changed, 9 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/vc-hooks.el	Mon Jul 19 01:01:17 1993 +0000
+++ b/lisp/vc-hooks.el	Mon Jul 19 04:03:52 1993 +0000
@@ -157,7 +157,8 @@
   ;; If FILE is registered but not locked, return " REV" if there is a head
   ;; revision and " @@" otherwise.
   ;; If FILE is locked then return all locks in a string of the
-  ;; form " LOCKER1:REV1 LOCKER2:REV2 ...".
+  ;; form " LOCKER1:REV1 LOCKER2:REV2 ...", where "LOCKERi:" is empty if you
+  ;; are the locker, and otherwise is the name of the locker followed by ":".
 
   ;; Algorithm: 
 
@@ -205,12 +206,16 @@
 	    (setq found (re-search-forward "^locks\\([^;]*\\);" nil t)))
 
           (if found
-	      ;; Clean control characters from text.
-	      (let* ((locks
+	      ;; Clean control characters and self-locks from text.
+	      (let* ((lock-pattern
+		      (concat "[ \b\t\n\v\f\r]+\\("
+			      (regexp-quote (user-login-name))
+			      ":\\|\\)"))
+		     (locks
 		      (save-restriction
 			(narrow-to-region (match-beginning 1) (match-end 1))
 			(goto-char (point-min))
-			(while (re-search-forward "[ \b\t\n\v\f\r]+" nil t)
+			(while (re-search-forward lock-pattern nil t)
 			  (replace-match " " t t))
 			(buffer-string)))
 		     (status