From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.bugs Subject: bug#9123: bug/misbehaviour in vc-next action when stealing locks Date: Mon, 5 Sep 2011 20:55:11 -0400 Message-ID: <20069.28527.535035.629774@fencepost.gnu.org> References: <32089101.post@talk.nabble.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=unknown Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1315270529 13351 80.91.229.12 (6 Sep 2011 00:55:29 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 6 Sep 2011 00:55:29 +0000 (UTC) Cc: 9123@debbugs.gnu.org To: Kourosh Neshatian Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 06 02:55:24 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R0jwi-0006Mj-FY for geb-bug-gnu-emacs@m.gmane.org; Tue, 06 Sep 2011 02:55:24 +0200 Original-Received: from localhost ([::1]:53594 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R0jwi-0000I4-3M for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Sep 2011 20:55:24 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:48569) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R0jwe-0000HF-22 for bug-gnu-emacs@gnu.org; Mon, 05 Sep 2011 20:55:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R0jwc-0004Zv-Kj for bug-gnu-emacs@gnu.org; Mon, 05 Sep 2011 20:55:19 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60565) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R0jwc-0004Zq-Ge for bug-gnu-emacs@gnu.org; Mon, 05 Sep 2011 20:55:18 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1R0k0E-0004ov-DQ; Mon, 05 Sep 2011 20:59:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Glenn Morris Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 06 Sep 2011 00:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9123 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 9123-submit@debbugs.gnu.org id=B9123.131527073918520 (code B ref 9123); Tue, 06 Sep 2011 00:59:02 +0000 Original-Received: (at 9123) by debbugs.gnu.org; 6 Sep 2011 00:58:59 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R0k0B-0004oe-6Q for submit@debbugs.gnu.org; Mon, 05 Sep 2011 20:58:59 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R0k08-0004oX-QD for 9123@debbugs.gnu.org; Mon, 05 Sep 2011 20:58:58 -0400 Original-Received: from localhost ([127.0.0.1]:43722) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R0jwW-0005Ba-9X; Mon, 05 Sep 2011 20:55:12 -0400 In-Reply-To: X-Attribution: GM X-Mailer: VM (www.wonderworks.com/vm), GNU Emacs (www.gnu.org/software/emacs) X-Hue: green X-Ran: J.\0w.;`H%1n&4LW-#JvXzkLRX?PM\1ow'&e#Q>#NT$3hJ#8.>]2#\gD}BWf X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 05 Sep 2011 20:59:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) 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:50622 Archived-At: Kourosh Neshatian wrote (on Sun, 4 Sep 2011 at 15:57 +1200): > I wonder if you could reproduce the error. No, see below. > > Steps to reproduce the error: > > > > 1. Alice (user name 'alice') runs Emacs with 'emacs -q --no-site-fi= le' > > > > 2. Alice creates a text file in the directory, say 'document.tex', = writes > > some text in it and saves it. > > > > 3. She runs 'vc-next-action' (C-x v v) and chooses RCS as her > > backend. This creates an RCS file 'RCS/document.tex,v'. > > > > 4. Alice checks out and locks the file again by 'vc-next-action' (C= -x > > v v) to add/make some changes in the document. I did the following as normal user A: umask 0 mkdir ~/foo echo "test" > foo/1 emacs-23.3 -Q foo/1 C-x v v RCS RET RET # now registered with RCS C-x v v # now file is checked out > > 5. Meanwhile, Bob (user name 'bob') logs in. =A0He has access to th= e RCS > > directory (usually via a symbolic link). He checks out document.tex= > > stealing =A0the lock (rcs -l ...). I logged in as normal user B and did: emacs-23.3 -Q ~A/foo/1 Emacs says "Note: file is write protected". C-x v v steal the lock yes/no=3F yes RET A mail buffer pops up, prompting me to send an email to user A explaini= ng why I stole the lock. I do so. > > 6. Now, Alice has finished editing her copy; she saves the file and= > > runs 'vc-next-action' (to check in). Emacs will ask her if she want= s > > to steal the lock, she says 'yes'. What happens is that Emacs > > over-writes her local copy by the last version in the > > repository. Alice's changes/edits are all gone and apparently she d= oes > > not have any means to recover! Back in user A's still-running Emacs, I type some text in the still open buffer. Emacs says: file changed on disk; really edit the buffer=3F=20 I answer yes, type some text and save. Emacs says: file has changed since visited or saved. Save anyway=3F I answer yes. Emacs says: file is write-protected; try to save anyway=3F I answer yes. I then do C-x v v and try to check in the file. This fails, with an error message that the file is locked by user B. This was with RCS 5.7. I never notmally use RCS, maybe I am missing something.