[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

vc-toggle-read-only mishandles CVS ro file in presence of CVSREAD=1

From: Thien-Thi Nguyen
Subject: vc-toggle-read-only mishandles CVS ro file in presence of CVSREAD=1
Date: Wed, 25 Jun 2008 07:04:33 +0200

While investigating the pgg-gpg.el bug report (another thread), i
did a cvs update and now `C-x C-q' bleats on a CVS-controlled
read-only file (w/ env var `CVSREAD' set to "1").  This used to
work before, so i consider the current situation a regression.

I see vc-toggle-read-only now reads:

| (defun vc-toggle-read-only (&optional verbose)
|   "Change read-only status of current buffer, perhaps via version control.
| If the buffer is visiting a file registered with version control,
| throw an error, because this is not a safe or really meaningful operation
| on any version-control system newer than RCS.
| Otherwise, just change the read-only flag of the buffer.
| If you bind this function to \\[toggle-read-only], then Emacs
| will properly intercept all attempts to toggle the read-only flag
| on version-controlled buffer."
|   (interactive "P")
|   (if (vc-backend buffer-file-name)
|       (error "Toggling the readability of a version controlled file is likely 
to wreak havoc.")
|     (toggle-read-only)))

The "not a safe ... newer than RCS" blurb is (gratuitously) wrong,
but at least we know the authors' bias up front.  I suggest we
remove that blurb and use checkout-model info to make this command
DTRT again.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]