# HG changeset patch # User Paul Eggert # Date 750623304 0 # Node ID a964061ab3504a00abed4eb15b7ccb00c2abb339 # Parent 3ec2205d12b551611d594dfc86ab4fc773c69b08 (vc-backend-checkout): Do not set umask to value that does not allow user-write permission while `co' is running; some versions of `co' won't work, because they can't write their temporaries. diff -r 3ec2205d12b5 -r a964061ab350 lisp/vc.el --- a/lisp/vc.el Thu Oct 14 04:30:19 1993 +0000 +++ b/lisp/vc.el Thu Oct 14 18:28:24 1993 +0000 @@ -1461,22 +1461,21 @@ (if workfile ;; RCS ;; RCS doesn't let us check out into arbitrary file names directly. ;; Use `co -p' and make stdout point to the correct file. - (let ((default-modes (default-file-modes)) - (vc-modes (logior (file-modes (vc-name file)) + (let ((vc-modes (logior (file-modes (vc-name file)) (if writable 128 0))) (failed t)) (unwind-protect (progn - (set-default-file-modes vc-modes) (vc-do-command 0 "/bin/sh" file "-c" - "filename=$1; shift; exec co \"$@\" >$filename" + (format "umask %o; exec >\"$1\" || exit; shift; umask %o; exec co \"$@\"" + (logand 511 (lognot vc-modes)) + (logand 511 (lognot (default-file-modes)))) "" ; dummy argument for shell's $0 filename (if writable "-l") (concat "-p" rev)) (setq failed nil)) - (set-default-file-modes default-modes) (and failed (file-exists-p filename) (delete-file filename)))) (vc-do-command 0 "co" file (if writable "-l")