Subject: bug#8924: closed (Re: bug#8924: 23.3; Editing is rather difficult using vc with RCS backend)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 25 Jun 2011 06:32:02 +0000

Your bug report

#8924: 23.3; Editing is rather difficult using vc with RCS backend

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
8924: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8924
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#8924: 23.3; Editing is rather difficult using vc with RCS backend
From: Eli Zaretskii <[email-masked]>
To: Richard Stanton <[email-masked]>
Cc: [email-masked]
Date: Sat, 25 Jun 2011 09:31:48 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

> From: Richard Stanton <[email-masked]>
> CC: "[email-masked]" <[email-masked]>
> Date: Fri, 24 Jun 2011 13:46:43 -0700
> 
> I did a little more testing, and it looks like the problem is indeed a Cygwin vs. non-Cygwin issue. On first checking in the file, I reported that the buffer remains read/write while the file itself is read-only. It turns out there's a little more to it:
> 
> I reported it being read-only after running the (Cygwin) ls command:
> 
> C:\projects\test\version\rcstest>ls -l test.tex
> -r-x------+ 1 stanton None 84 Jun 24 13:40 test.tex
> 
> However, DOS doesn't see it as read-only, which explains why Emacs leaves the buffer writable:
> 
> C:\projects\test\version\rcstest>attrib test.tex
> A            C:\projects\test\version\rcstest\test.tex
> 
> If I manually set the file to read only using attrib +R, then reload the file into Emacs,
> 
> a. The buffer is now read-only, and I can't edit it until I press C-x v v again to check it out. Now everything works OK.
> 
> b. The $Id$ header issue has also gone away.
> 
> So it seems to be an inconsistency between the way DOS and Cygwin keep track of file attributes.

Yes, that figures.  Cygwin uses NTFS ACLs to emulate Posix file
permissions, and does not set the DOS Readonly attribute to match the
ACLs.  The native Emacs build does not pay attention to the NTFS ACLs,
so it doesn't know the file was made read-only.

I'm closing this bug report.

> Now I just need to track down a working non-Cygwin version of RCS...

I sent my binaries off-list.

Subject: 23.3; Editing is rather difficult using vc with RCS backend
From: Richard Stanton <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Thu, 23 Jun 2011 14:20:43 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

I regularly use vc to keep track of versions of my edited files,
primarily using CVS, but less often using RCS, mainly where there's
just a single file I want to track edits to, and it's more convenient to
keep the repository with the file.

This all used to work fine (though I can't exactly recall what version
of EMACS was the last under which all worked fine). However, while
vc+CVS still works fine, vc+RCS acts in some rather strange ways that
make using it inconvenient or even risky.

1) As an example, in a directory rcstest, 

a. Create and save a new LaTeX document in EMACS, say rcstest/test.tex, containing the test

-----

% $Id$
\documentclass[12pt]{article}
\begin{document}
A very short document
\end{document}

----

b. Now type C-x v v and ask Emacs to use the RCS backend. It checks in the
file, the current buffer now displays RCS-1.1 in the mode line, and the
first line of the file now contains

% $Id: test.tex,v 1.1 2011/06/23 20:51:48 stanton Exp $

All looking good so far.

c. Now edit the file by adding another comment line beneath the first,
e.g.,

% Here's another comment

Save the file and then type C-x v v. I'd expect it to check in the new
version, making it revision 1.2 (this is what happens now if I use vc+CVS
instead of vc+RCS, and used to happen under prior versions of EMACS when I
used vc+RCS). However, instead I get a message telling me "Fileset is
up-to-date", and nothing else happens. The file, repository, and buffer
are left completely unchanged. This is not so useful...

2) The initial $Id$ line seems important here. If I do the same thing
again, but do *not* include the initial % $Id$ line in the file,
different things happen. 

a. Create, save, and register with RCS backend a new file as above, this time containing the text

-----

\documentclass[12pt]{article}
\begin{document}
A very short document
\end{document}

----

b. Now edit the file by adding a comment somewhere, say, after line 1,

% Here's a comment

Save the file and then type C-x v v. This time, I get an error buffer
telling me

RCS/test.tex,v  -->  test.tex
revision 1.1 (locked)
co: writable test.tex exists; checkout aborted

and again cannot check in the new file.

3) Sometimes the behavior is different still. With no header line,
sometimes instead of the error message above, when I type C-x v v, the
most recently checked-in version of the file is checked out again,
over-writing my edits in the current buffer. This is a bit scary...

It seems that I can get this to work if, after checking in the file
using C-x v v, I immediately press C-x v v again, which causes Emacs to
tell me it's checking the file out again (even though nothing changes in
the current buffer that I can see), and then I can edit, save, and check
in OK (as long as I remember to use C-x v v twice each time I check the
file in). This is at least possible, but it differs from the behavior
when I'm using the CVS backend, and from the old behavior of the RCs
backend (and if I ever forget, I'm in danger of losing all my edits
since the last check-in, something that isn't so good).

Thanks for checking into this.

Richard Stanton

In GNU Emacs 23.3.1 (i386-mingw-nt6.0.6002)
 of 2011-03-10 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 6.0.6002
configured using `configure --with-gcc (4.5) --no-opt --cflags -Ic:/imagesupport/include'

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: ENU
  value of $XMODIFIERS: nil
  locale-coding-system: cp1252
  default enable-multibyte-characters: t

Major mode: LaTeX/P

Minor modes in effect:
  reftex-mode: t
  flyspell-mode: t
  outline-minor-mode: t
  TeX-PDF-mode: t
  shell-dirtrack-mode: t
  yas/global-mode: t
  yas/minor-mode: t
  recentf-mode: t
  ido-everywhere: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  visual-line-mode: t
  transient-mark-mode: t
  abbrev-mode: t

Recent input:
<return> <kp-right> <kp-right> <kp-right> <kp-right> 
<kp-right> $ C-k C-x C-s C-x v v R C S <return> <return> 
<help-echo> <down-mouse-1> <mouse-1> <down-mouse-1> 
<mouse-1> <kp-up> <kp-up> <kp-down> % SPC A d d SPC 
a SPC c o m m e n t <return> C-x C-s C-x v v C-x v 
v C-x v v <kp-up> <kp-up> <kp-up> <kp-down> C-k <kp-up> 
C-k C-k C-k C-k C-x C-s C-x v v q q C-x k <return> 
C-x o C-x 1 C-x v v q <help-echo> <down-mouse-1> <mouse-1> 
<help-echo> <down-mouse-1> <mouse-1> C-x k <return> 
C-x o C-x 1 C-x C-v <return> C-k C-k C-k C-a C-x C-s 
C-x v v R C S <return> <return> C-x v v <return> <return> 
<up> <up> % SPC A d d SPC a SPC c o m m e n t <return> 
C-k C-x C-s C-x v v A d d e d SPC a SPC c o m m e n 
t C-c C-c % SPC A d d SPC a SPC n e w SPC c o m m e 
n t <return> C-x C-s q C-x C-s q <help-echo> <down-mouse-1> 
<mouse-1> C-x C-s q C-x v v <C-kp-home> <kp-end> <return> 
% SPC A d d SPC a n o t h e r SPC c m m <backspace> 
<backspace> o m m e n t C-c C-c C-g C-g C-x C-s C-x 
v v A d d e d SPC a SPC n o t e h r <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
n o t h e r C-c C-c <return> % SPC A n d SPC n o w 
? C-x C-s q <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <down-mouse-1> <mouse-1> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <menu-bar> <help-menu> <send-emacs-bug
-report>

Recent messages:
Mark set
Press C-c C-c when you are done editing.
Enter a change comment.  Type C-c C-c when done
Checking in c:/projects/test/version/rcs/duration.tex...done
Saving file c:/projects/test/version/rcs/duration.tex...
Entering debugger...
Back to top level.
Auto-saving...
Sorting environment...
Removing duplicates... done

Load-path shadows:
c:/emacs/emacs-23.3/site-lisp/cedet-1.0/speedbar/speedbar hides c:/emacs/emacs-23.3/lisp/speedbar
c:/emacs/emacs-23.3/site-lisp/cedet-1.0/speedbar/sb-image hides c:/emacs/emacs-23.3/lisp/sb-image
c:/emacs/emacs-23.3/site-lisp/cedet-1.0/common/ezimage hides c:/emacs/emacs-23.3/lisp/ezimage
c:/emacs/emacs-23.3/site-lisp/cedet-1.0/speedbar/dframe hides c:/emacs/emacs-23.3/lisp/dframe
c:/emacs/emacs-23.3/site-lisp/cedet-1.0/eieio/eieio hides c:/emacs/emacs-23.3/lisp/emacs-lisp/eieio
c:/emacs/emacs-23.3/site-lisp/cedet-1.0/eieio/eieio-speedbar hides c:/emacs/emacs-23.3/lisp/emacs-lisp/eieio-speedbar
c:/emacs/emacs-23.3/site-lisp/cedet-1.0/eieio/eieio-opt hides c:/emacs/emacs-23.3/lisp/emacs-lisp/eieio-opt
c:/emacs/emacs-23.3/site-lisp/cedet-1.0/eieio/eieio-datadebug hides c:/emacs/emacs-23.3/lisp/emacs-lisp/eieio-datadebug
c:/emacs/emacs-23.3/site-lisp/cedet-1.0/eieio/eieio-custom hides c:/emacs/emacs-23.3/lisp/emacs-lisp/eieio-custom
c:/emacs/emacs-23.3/site-lisp/cedet-1.0/eieio/eieio-comp hides c:/emacs/emacs-23.3/lisp/emacs-lisp/eieio-comp
c:/emacs/emacs-23.3/site-lisp/cedet-1.0/eieio/eieio-base hides c:/emacs/emacs-23.3/lisp/emacs-lisp/eieio-base
c:/emacs/emacs-23.3/site-lisp/cedet-1.0/eieio/chart hides c:/emacs/emacs-23.3/lisp/emacs-lisp/chart
c:/emacs/emacs-23.3/site-lisp/cedet-1.0/srecode/srecode hides c:/emacs/emacs-23.3/lisp/cedet/srecode
c:/emacs/emacs-23.3/site-lisp/cedet-1.0/semantic/semantic hides c:/emacs/emacs-23.3/lisp/cedet/semantic
c:/emacs/emacs-23.3/site-lisp/cedet-1.0/common/pulse hides c:/emacs/emacs-23.3/lisp/cedet/pulse
c:/emacs/emacs-23.3/site-lisp/cedet-1.0/common/mode-local hides c:/emacs/emacs-23.3/lisp/cedet/mode-local
c:/emacs/emacs-23.3/site-lisp/cedet-1.0/common/inversion hides c:/emacs/emacs-23.3/lisp/cedet/inversion
c:/emacs/emacs-23.3/site-lisp/cedet-1.0/ede/ede hides c:/emacs/emacs-23.3/lisp/cedet/ede
c:/emacs/emacs-23.3/site-lisp/cedet-1.0/common/data-debug hides c:/emacs/emacs-23.3/lisp/cedet/data-debug
c:/emacs/emacs-23.3/site-lisp/cedet-1.0/common/cedet hides c:/emacs/emacs-23.3/lisp/cedet/cedet
c:/emacs/emacs-23.3/site-lisp/cedet-1.0/common/cedet-idutils hides c:/emacs/emacs-23.3/lisp/cedet/cedet-idutils
c:/emacs/emacs-23.3/site-lisp/cedet-1.0/common/cedet-global hides c:/emacs/emacs-23.3/lisp/cedet/cedet-global
c:/emacs/emacs-23.3/site-lisp/cedet-1.0/common/cedet-files hides c:/emacs/emacs-23.3/lisp/cedet/cedet-files
c:/emacs/emacs-23.3/site-lisp/cedet-1.0/common/cedet-cscope hides c:/emacs/emacs-23.3/lisp/cedet/cedet-cscope

Features:
(shadow sort mail-extr message ecomplete rfc822 mml mml-sec
password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231
rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc
time-date mm-util mail-prsvr gmm-utils mailheader canlock hashcash
mail-utils emacsbug ediff-vers ediff-merg ediff-diff ediff-wind
ediff-help ediff-util ediff-mult ediff-init ediff parse-time
cedet-edebug debug log-edit pcvs-util add-log help-mode view vc-arch
vc-mtn vc-hg vc-git vc-bzr sha1 hex-util vc-sccs vc-svn vc-cvs vc-rcs vc
vc-dispatcher texmathp ede-linux ede-emacs ede-cpp-root preview
prv-emacs reftex-vcr reftex-dcr reftex reftex-vars bib-cite flyspell
ispell tex-buf noutline outline font-latex newcomment latex tex-style
tex latexenc semantic-el semantic-bovine bovine-debug semantic-debug
cus-start cus-load ess-toolbar ess-mouse mouseme browse-url ess-menu
ess-swv ess-noweb noweb-font-lock-mode ess-bugs-l essd-els ess-sas-d
ess-sas-l ess-sas-a executable shell ess-arc-d ess-vst-d ess-xls-d
ess-lsp-l ess-sta-d ess-sta-l cc-vars cc-defs make-regexp ess-sp6w-d
ess-sp4-d ess-sp3-d ess-r-d ess-r-args ess-s-l ess-inf ess-utils
ess-mode noweb-mode ess ess-custom ess-compat ess-site ecb ecb-symboldef
ecb-analyse ecb-compatibility ecb-winman-support ecb-autogen autoload
ecb-tod ecb-cycle ecb-eshell ecb-help ecb-jde ecb-method-browser
hideshow ecb-file-browser ecb-layout compile ecb-create-layout
ecb-compilation ecb-speedbar ecb-common-browser ecb-cedet-wrapper
ecb-navigate silentcomp ecb-mode-line ecb-face tree-buffer ecb-upgrade
ecb-util thingatpt semantic-dep semantic-ia srecode-mode cogre-srecode
semantic-edit srecode-template-mode srecode-template srecode-template-wy
wisent-comp semantic-wisent wisent srecode-map srecode-insert
srecode-fields srecode-args srecode-dictionary srecode-find srecode-ctxt
srecode-compile srecode-table semantic-decorate-include
semantic-decorate-mode semantic-decorate pulse semantic-mru-bookmark
semanticdb-mode semantic-idle eldoc senator which-func semantic-imenu
semantic-sb imenu cedet cedet-contrib-load contrib-loaddefs cogre-load
cogre-loaddefs speedbar-load speedbar-loaddefs ede-load ede-loaddefs
ede-speedbar ede-files ede ede-base eieio-datadebug data-debug ede-auto
eieio-speedbar semantic-ia-sb semantic-analyze semantic-scope
semantic-analyze-fcn semanticdb-find semanticdb-ref semantic-find
semantic-sort semanticdb-el eieio-opt semanticdb semantic-lex-spp
semantic-ctxt semantic-format semantic-util-modes semantic-util semantic
semantic-lex semantic-tag working fame speedbar sb-image ezimage dframe
eieio-custom ede-source eieio-base srecode-load srecode srecode-loaddefs
semantic-load semantic-fw semantic-loaddefs mode-local find-func
eieio-load eieio-loaddefs cedet-load cedet-compat cedet-loaddefs eieio
warnings byte-opt bytecomp byte-compile eieio-comp inversion ropemacs
pymacs auto-complete-yasnippet yasnippet dropdown-list derived
easy-mmode assoc cl cl-19 auto-complete edmacro kmacro popup python-21
python tex-mik server sumatra-forward recentf tree-widget wid-edit
easymenu uniquify advice help-fns advice-preload ido cygwin-mount
ange-ftp regexp-opt comint ring preview-latex tex-site auto-loads
tooltip ediff-hook vc-hooks lisp-float-type mwheel dos-w32 disp-table
ls-lisp w32-win w32-vars tool-bar dnd fontset image fringe lisp-mode
register page menu-bar rfn-eshadow timer select scroll-bar mldrag mouse
jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
loaddefs button minibuffer faces cus-face files text-properties overlay
md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process multi-tty emacs)