all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Glenn Morris <rgm@gnu.org>
To: Kourosh Neshatian <neshatian@gmail.com>
Cc: 9123@debbugs.gnu.org
Subject: bug#9123: bug/misbehaviour in vc-next action when stealing locks
Date: Mon, 5 Sep 2011 20:55:11 -0400	[thread overview]
Message-ID: <20069.28527.535035.629774@fencepost.gnu.org> (raw)
In-Reply-To: <CAEZCCWQU=hcVd0LTX9+=RLbZou2j4YsqQYAAWyngA9bwLEJC8g@mail.gmail.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=unknown, Size: 2238 bytes --]


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-file'
> >
> > 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.  He has access to the RCS
> > directory (usually via a symbolic link). He checks out document.tex
> > stealing  the 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?  yes RET

A mail buffer pops up, prompting me to send an email to user A explaining
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 wants
> > 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 does
> > 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? 

I answer yes, type some text and save. Emacs says:

  file has changed since visited or saved.  Save anyway?

I answer yes. Emacs says:

  file is write-protected; try to save anyway?

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.






  parent reply	other threads:[~2011-09-06  0:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-19  8:09 bug#9123: bug/misbehaviour in vc-next action when stealing locks albemarle
2011-08-10 21:13 ` Glenn Morris
2011-08-11  6:43   ` Kourosh Neshatian
     [not found]     ` <CAEZCCWQU=hcVd0LTX9+=RLbZou2j4YsqQYAAWyngA9bwLEJC8g@mail.gmail.com>
2011-09-06  0:55       ` Glenn Morris [this message]
2014-02-03 23:51         ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20069.28527.535035.629774@fencepost.gnu.org \
    --to=rgm@gnu.org \
    --cc=9123@debbugs.gnu.org \
    --cc=neshatian@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.