Subject: Re: bug#58192: 28.2; RCS integration issue

From: Eli Zaretskii <[email-masked]>
Date: Fri, 30 Sep 2022 15:09:26 +0300

> Cc: [email-masked]
> Date: Fri, 30 Sep 2022 13:44:36 +0300
> From: Eli Zaretskii <[email-masked]>
> 
> > Date: Fri, 30 Sep 2022 10:01:51 +0200 (CEST)
> > From: "Meyer, Thomas" <[email-masked]>
> > 
> > Dear emacs developers, we have an issue with vc-rcs, that we have been
> > using for a long time, and which seems to be broken in 28.2 (actually
> > first noticed this in 28.1): we are working on the Windows port
> > available on http://ftp.gnu.org/gnu/emacs/windows/emacs-28/.
> > 
> > By tracing the activity of e.g. ci command with process monitor, we
> > found that the commands fail because an erraneous line break is send
> > with the command, e.g.
> > 
> > ----
> > PID: 7224, Command line: C:\Windows\system32\cmd.exe /c c:\bin\ci.cmd -j -u1 "-mSummary: bla
> > " RCS/x.txt,v
> > ----
> > 
> > To reproduce:
> > 
> > find new file in new directory
> > C-x v v (vc-next-action)
> > Registration will work fine (Registering (c:/Users/meyert/Documents/RCS-test/a.txt)... done)
> > change file
> > C-x v v (vc-next-action) -> first error: a checkout is done, erasing the changes
> > change file again
> > C-x v v (vc-next-action) -> second error: check-in fails:
> > 
> >    Press C-c C-c when you are done editing.
> >    Enter a change comment.  Type C-c C-c when done
> >    Checking in c:/Users/meyert/Documents/RCS-test/a.txt...
> >    progn: Failed (status 1): ci -j -u1 -mSummary: bla
> >     RCS/a.txt,v
> > 
> > Do you require further details?
> 
> Where did the "bla" part come from?  Emacs didn't generate it, did it?
> It's something you typed at some point, I guess?
> 
> More generally, would you please describe the steps in full detail,
> including what you typed, exactly?
> 
> Also, what does ci.cmd say?  I'm not aware of any scripts in the RCS
> distribution; 'ci' should be a program, i.e. ci.exe.  It could be that
> what ci.cmd does has some relevance for this issue.

FWIW, I've now tried to reproduce the problem, and was unable to.

Here's what I did:

 emacs -Q
 C-x C-f hello.text
 <Type some text>
 C-x C-s
 C-x v v
 <This asks for a backend: answer "RCS RET">
 <It then asks in which directory to create the repository: type RET>
 <Registration OK: "Registering (d:/usr/tmp/hello.txt)... done">
 <The file is now displayed as read-only, as expected.>
 C-x v v
 <This checks out the file, so it could be modified: this is a must
 with RCS, and not a bug>
 <Modify the file>
 C-x C-s
 C-x v v
 <This shows a commit log buffer:
 Press C-c C-c when you are done editing.
 Enter a change comment.  Type C-c C-c when done
 <Enter text in Summary and type C-c>
 <Check-in OK: "Checking in d:/usr/tmp/hello.txt...done">
 <C-x v l then shows the expected log>

So once again, more details are needed to investigate what's wrong in
your case.

An important detail: I used RCS I ported myself, which is available
here:

  https://sourceforge.net/projects/ezwinports/files/

It's possible that using a Cygwin port of RCS somehow interferes with
the native Emacs.

Another possibly important factoid is that the file hello.txt I used
in the above had DOS CRLF EOL format, as that is what the Windows port
of RCS expects and produces when checking-out files.

Bottom line: I cannot reproduce the problem on my system.