unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Read-only warning message
@ 2011-05-17 17:34 sdn.gnuem
  2011-05-17 18:30 ` Memnon Anon
  0 siblings, 1 reply; 4+ messages in thread
From: sdn.gnuem @ 2011-05-17 17:34 UTC (permalink / raw)
  To: help-gnu-emacs

Hello emacs folks,



    This is not a desperate call for urgent help or anything -- this is just something that has bugged me for some time.



    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?  What earthly relevance could the file's being under version-control have to my toggling the buffer's read-only state?



Thanks,

-- Sue D. Nymme



----------
This message was sent from a MailNull anti-spam account.  You can get
your free account and take control over your email by visiting the
following URL.

   http://mailnull.com/



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Read-only warning message
  2011-05-17 17:34 Read-only warning message sdn.gnuem
@ 2011-05-17 18:30 ` Memnon Anon
  2011-05-17 19:06   ` Perry Smith
  0 siblings, 1 reply; 4+ messages in thread
From: Memnon Anon @ 2011-05-17 18:30 UTC (permalink / raw)
  To: help-gnu-emacs

sdn.gnuem@mailnull.com writes:

> Hello emacs folks, 
>
> This is not a desperate call for urgent help or
> anything -- this is just something that has bugged me for some time.
>
>     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? What earthly relevance could the file's
> being under version-control have to my toggling the buffer's
> read-only state?

,----
| commit c97bded566032831e282666899ff847ba58c69a2
| Author: André Spiegel <spiegel@gnu.org>
| Date:   Tue Jul 16 17:40:37 2002 +0000
| 
|     Bind toggle-read-only to C-x C-q.
|     (toggle-read-only): Display a warning message if the file is under
|     version control.
`----

This message has been there for 9 years; pitty there is no hint in
there.

But I just checked: Using view mode displays no warning. 
If the warning bothers you, you may want to consider using it instead.

Memnon




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Read-only warning message
  2011-05-17 18:30 ` Memnon Anon
@ 2011-05-17 19:06   ` Perry Smith
  0 siblings, 0 replies; 4+ messages in thread
From: Perry Smith @ 2011-05-17 19:06 UTC (permalink / raw)
  To: Memnon Anon; +Cc: help-gnu-emacs


On May 17, 2011, at 1:30 PM, Memnon Anon wrote:

> sdn.gnuem@mailnull.com writes:
> 
>> Hello emacs folks, 
>> 
>> This is not a desperate call for urgent help or
>> anything -- this is just something that has bugged me for some time.
>> 
>>    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? What earthly relevance could the file's
>> being under version-control have to my toggling the buffer's
>> read-only state?
> 
> ,----
> | commit c97bded566032831e282666899ff847ba58c69a2
> | Author: André Spiegel <spiegel@gnu.org>
> | Date:   Tue Jul 16 17:40:37 2002 +0000
> | 
> |     Bind toggle-read-only to C-x C-q.
> |     (toggle-read-only): Display a warning message if the file is under
> |     version control.
> `----
> 
> This message has been there for 9 years; pitty there is no hint in
> there.
> 
> But I just checked: Using view mode displays no warning. 
> If the warning bothers you, you may want to consider using it instead.

I may be daft but I believe I recall that long ago, that is how you checked files in and out.  If the file was not checked out and you edited it, it would be read-only.  And to toggle that, you could do ^X-^Q and that would trigger emacs into checking out the file.  Thus, the warning when that procedure changed to alert people that things have changed.

pedz




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Read-only warning message
@ 2011-05-28 11:04 Ben Key
  0 siblings, 0 replies; 4+ messages in thread
From: Ben Key @ 2011-05-28 11:04 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1452 bytes --]

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.

[-- Attachment #2: Type: text/html, Size: 1616 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-05-28 11:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-17 17:34 Read-only warning message sdn.gnuem
2011-05-17 18:30 ` Memnon Anon
2011-05-17 19:06   ` Perry Smith
  -- strict thread matches above, loose matches on Subject: below --
2011-05-28 11:04 Ben Key

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).