From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jonathan Kamens Newsgroups: gmane.emacs.bugs Subject: bug#11490: vc-next-action overwrites changes in non-checked-out RCS file Date: Thu, 03 Jan 2013 22:17:42 -0500 Message-ID: <50E649D6.4090808@kamens.us> References: <4FB40003.3050502@kamens.us> <4FB451AE.60508@kamens.us> <4FB65ECA.6000205@kamens.us> <87txqxr6y8.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------000505060704020209040906" X-Trace: ger.gmane.org 1357269485 20288 80.91.229.3 (4 Jan 2013 03:18:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 4 Jan 2013 03:18:05 +0000 (UTC) Cc: 11490@debbugs.gnu.org, Chong Yidong To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 04 04:18:22 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TqxnZ-0005BW-EP for geb-bug-gnu-emacs@m.gmane.org; Fri, 04 Jan 2013 04:18:21 +0100 Original-Received: from localhost ([::1]:50023 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqxnK-0004Ez-8m for geb-bug-gnu-emacs@m.gmane.org; Thu, 03 Jan 2013 22:18:06 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:45877) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqxnE-0004Eg-Ck for bug-gnu-emacs@gnu.org; Thu, 03 Jan 2013 22:18:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TqxnC-0006jk-0s for bug-gnu-emacs@gnu.org; Thu, 03 Jan 2013 22:18:00 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60347) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqxnB-0006je-Tw for bug-gnu-emacs@gnu.org; Thu, 03 Jan 2013 22:17:57 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TqxnG-0005F1-48 for bug-gnu-emacs@gnu.org; Thu, 03 Jan 2013 22:18:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jonathan Kamens Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Jan 2013 03:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11490 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed help Original-Received: via spool by 11490-submit@debbugs.gnu.org id=B11490.135726947120130 (code B ref 11490); Fri, 04 Jan 2013 03:18:02 +0000 Original-Received: (at 11490) by debbugs.gnu.org; 4 Jan 2013 03:17:51 +0000 Original-Received: from localhost ([127.0.0.1]:42365 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tqxn5-0005Ec-0C for submit@debbugs.gnu.org; Thu, 03 Jan 2013 22:17:51 -0500 Original-Received: from jik3.kamens.brookline.ma.us ([128.177.28.63]:43368) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tqxn2-0005EV-Vk for 11490@debbugs.gnu.org; Thu, 03 Jan 2013 22:17:49 -0500 Original-Received: from jik2.kamens.brookline.ma.us (209-6-65-228.c3-0.abr-ubr1.sbo-abr.ma.cable.rcn.com [209.6.65.228]) (authenticated bits=0) by jik3.kamens.brookline.ma.us (8.13.8/8.13.8) with ESMTP id r043Hg3f022203 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 3 Jan 2013 22:17:42 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.73 on 128.177.28.63 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:69367 Archived-At: This is a multi-part message in MIME format. --------------000505060704020209040906 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 01/03/2013 10:11 PM, Glenn Morris wrote: > Chong Yidong wrote: > >> Can someone summarize again a *correct* recipe to see the bug? > mkdir foo > cd foo > mkdir RCS > echo initial > file > ci -u -t-foo file > emacs-24.2 -Q file > > M-x toggle-read-only > > Enter some text in the buffer, eg now it looks like: > > ----- > initial > foobar > ----- > > Press C-x v v, and "foobar" is deleted with no prompting and no way to > get it back. > > I changed vc-mistrust-permissions to t for 24.3 because of this. > But now that I check, it doesn't seem to help... The problem described above may indeed be a problem, but it's not the problem I reported. The problem I reported is: mkdir foo cd foo mkdir RCS echo initial > file ci -u -t-foo file chmod +w file echo second >> file chmod -w file emacs -Q file C-x v v - the changes are overwritten without prompting I think the step missing from Chong Yidong's recipe was making sure the file is read-only before trying to edit it in emacs. If vc-mistrust-permissions is true by default then this issue doesn't occur. jik --------------000505060704020209040906 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 01/03/2013 10:11 PM, Glenn Morris wrote:
Chong Yidong wrote:

Can someone summarize again a *correct* recipe to see the bug?
mkdir foo
cd foo
mkdir RCS
echo initial > file
ci -u -t-foo file
emacs-24.2 -Q file

M-x toggle-read-only

Enter some text in the buffer, eg now it looks like:

-----
initial
foobar
-----

Press C-x v v, and "foobar" is deleted with no prompting and no way to
get it back.

I changed vc-mistrust-permissions to t for 24.3 because of this.
But now that I check, it doesn't seem to help...
The problem described above may indeed be a problem, but it's not the problem I reported.

The problem I reported is:

mkdir foo
cd foo
mkdir RCS
echo initial > file
ci -u -t-foo file
chmod +w file
echo second >> file
chmod -w file
emacs -Q file
C-x v v - the changes are overwritten without prompting

I think the step missing from Chong Yidong's recipe was making sure the file is read-only before trying to edit it in emacs.

If vc-mistrust-permissions is true by default then this issue doesn't occur.

  jik
--------------000505060704020209040906--