Mercurial > emacs
comparison lisp/vc-hooks.el @ 104599:9c2da353b60f
* vc-hooks.el (vc-user-login-name):
Let-bind `process-file-side-effects' with nil.
author | Michael Albinus <michael.albinus@gmx.de> |
---|---|
date | Tue, 25 Aug 2009 09:02:59 +0000 |
parents | 0c5de07aff62 |
children | c220a29e75fd |
comparison
equal
deleted
inserted
replaced
104598:1c78b6ed2b93 | 104599:9c2da353b60f |
---|---|
434 | 434 |
435 (defun vc-user-login-name (file) | 435 (defun vc-user-login-name (file) |
436 "Return the name under which the user accesses the given FILE." | 436 "Return the name under which the user accesses the given FILE." |
437 (or (and (eq (string-match tramp-file-name-regexp file) 0) | 437 (or (and (eq (string-match tramp-file-name-regexp file) 0) |
438 ;; tramp case: execute "whoami" via tramp | 438 ;; tramp case: execute "whoami" via tramp |
439 (let ((default-directory (file-name-directory file))) | 439 (let ((default-directory (file-name-directory file)) |
440 process-file-side-effects) | |
440 (with-temp-buffer | 441 (with-temp-buffer |
441 (if (not (zerop (process-file "whoami" nil t))) | 442 (if (not (zerop (process-file "whoami" nil t))) |
442 ;; fall through if "whoami" didn't work | 443 ;; fall through if "whoami" didn't work |
443 nil | 444 nil |
444 ;; remove trailing newline | 445 ;; remove trailing newline |