From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ben Key Newsgroups: gmane.emacs.help Subject: Re: Read-only warning message Date: Sat, 28 May 2011 06:04:29 -0500 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=bcaec5555380db4e5404a45405dc X-Trace: dough.gmane.org 1306580704 16972 80.91.229.12 (28 May 2011 11:05:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 28 May 2011 11:05:04 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat May 28 13:04:59 2011 Return-path: Envelope-to: geh-help-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 1QQHKE-00076g-RX for geh-help-gnu-emacs@m.gmane.org; Sat, 28 May 2011 13:04:58 +0200 Original-Received: from localhost ([::1]:38275 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQHKE-00015c-Cf for geh-help-gnu-emacs@m.gmane.org; Sat, 28 May 2011 07:04:58 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:57300) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQHK9-00015C-3Z for help-gnu-emacs@gnu.org; Sat, 28 May 2011 07:04:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QQHK6-0005rT-Ip for help-gnu-emacs@gnu.org; Sat, 28 May 2011 07:04:53 -0400 Original-Received: from mail-bw0-f41.google.com ([209.85.214.41]:40902) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQHK6-0005rJ-Cg for help-gnu-emacs@gnu.org; Sat, 28 May 2011 07:04:50 -0400 Original-Received: by bwz17 with SMTP id 17so2354407bwz.0 for ; Sat, 28 May 2011 04:04:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:from:date:message-id:subject:to :content-type; bh=JboYec7Puut/Rde5hJhFx8w72UgwzYBfeNFll17Y9A0=; b=JCA1vY2nQmjLxwurV5fEJqpwcAXTqqasosLICb1Z9VXThYCEMwAB4GVtwpapJVCb62 PwX54/lyc8oFuHGV05BxpSDfdq02duOfwYg//yYf/mA7ymczU2hUnk0TtAcUnY8lw4ED 6VGsNyjnMopcE244P9+aXh+5TMmwAJQBiezGI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=FGAe2ICesOqPV2cKno4FYxfBlzu+XSdAEwGDnsD+qOw5Plpft1pCoq9aaPpGtPYumG cd+gGPia4Ttr3qeDDAq6R3RG5aDrjg6bN2pOY0CvB9FN4duGSqwF/WO+gn8fZ8BEv5CY J8peczBU1RDJJtd4MYvCrLDuqxMtr6+PnNZVE= Original-Received: by 10.204.35.206 with SMTP id q14mr2469673bkd.128.1306580689308; Sat, 28 May 2011 04:04:49 -0700 (PDT) Original-Received: by 10.204.52.19 with HTTP; Sat, 28 May 2011 04:04:29 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.214.41 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:81258 Archived-At: --bcaec5555380db4e5404a45405dc Content-Type: text/plain; charset=ISO-8859-1 Hello, sdn.gnuem@mailnull.com writes: > When you make a buffer read-only (via C-x C-q toggle-read-only), and the file > in the buffer is under version control, you get a warning message: "File is > under version-control; use C-x v v to check in/out". > Anyone have any idea why? I can see one possible reason for this warning message. Some version control systems, Perforce is one example, set all files that are under version control read only by default. If you want to modify a given file, you are supposed to Check Out or Open the File For Edit first. When you use this command, it toggles the read only state of the file off. When you are done with the file you are supposed to submit the change. Perforce, unlike Subversion and Bazaar, by default does not automatically notice files that you have modified on disk. It only knows about files you have first checked out. So, if you manually toggle the read only state of the file off, Perforce has absolutely no idea that it has changed; the submit command will only submit files you first checked out with the edit command. Thus, by manually toggling the read only state of the file you run the risk of confusing any version control systems that work like this, and, as a result, changes you made may not be submitted as you expect. This possibility is most likely what lead to the warning message being added. I hope this information helps. Note: I happen to use Perforce at work. --bcaec5555380db4e5404a45405dc Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello,

sd= n.gnuem@mailnull.com writes:

> When you make a buffer read-on= ly (via C-x C-q toggle-read-only), and the file
> in the buffer is un= der version control, you get a warning message: "File is
> under version-control; use C-x v v to check in/out".

> = Anyone have any idea why?

I can see one possible reason for this wa= rning message.=A0 Some version control systems, Perforce is one example, se= t all files that are under version control read only by default.=A0 If you = want to modify a given file, you are supposed to Check Out or Open the File= For Edit first.=A0 When you use this command, it toggles the read only sta= te of the file off.=A0 When you are done with the file you are supposed to = submit the change.

Perforce, unlike Subversion and Bazaar, by default does not automatical= ly notice files that you have modified on disk.=A0 It only knows about file= s you have first checked out.=A0 So, if you manually toggle the read only s= tate of the file off, Perforce has absolutely no idea that it has changed; = the submit command will only submit files you first checked out with the ed= it command.=A0 Thus, by manually toggling the read only state of the file y= ou run the risk of confusing any version control systems that work like thi= s, and, as a result, changes you made may not be submitted as you expect.
This possibility is most likely what lead to the warning message being = added.

I hope this information helps.

Note: I happen to use P= erforce at work.

--bcaec5555380db4e5404a45405dc--