Are my RCS files actually malformed?

"Peter Budny" <[email protected]> Fri, 18 Jan 2013 17:24:19 -0500
Newsgroups gmane.comp.gnu.rcs
Message-ID <[email protected]>
This is a multipart message in MIME format.

------=_NextPart_000_023D_01CDF5A0.A702BF40
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hello,

 

I'm trying to run cvs2hg on a very old CVS repository. This repository has
gone through at least one other conversion tool (mks2cvs) about 10 years
ago, has had heavy use with CVSNT. the usual things that will probably make
you groan.

 

Anyway, the tool keeps complaining about malformed RCS edits, and I can't
find enough documentation on what constitutes a *well-formed* RCS edit to
figure out whether it's the RCS file at fault or the tool. I'm hoping you
can answer a couple of examples for me, and then I'll know whether I should
try to fix the file or the tool.

 

Case 1:

If you have a file that ends with a Unix newline ('\n'), how many lines does
it have?

In other words, should an edit for that file look like:

@d1 50

a50 1

This file ends with a newline character.

@

Or should it look like:

@d1 50

a50 2

This file ends with a newline character.

@

Does it matter if the file is binary?

I assume that if the file *doesn't* end in a newline, then it only has 1
line, such as:

@d1 50

a50 1

This file ends right here.@

 

Case 2:

Does it matter if the "text" command after the log is on a new line? Or can
it follow the "@" ending the log immediately without a newline?

In other words, is this a valid revision?

1.5

log

@ @text

@@

 

I may have more questions, but if you can answer these, or show me where to
find decent documentation of the format (the best I found was on the Info
page for Diffutils, but that doesn't answer either of these questions), I'd
be really grateful.

 

-- 

Peter Budny

Unicoi Systems


------=_NextPart_000_023D_01CDF5A0.A702BF40
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40"><head><meta =
http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii"><meta name=3DGenerator content=3D"Microsoft Word 14 =
(filtered medium)"><style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
	{mso-style-priority:34;
	margin-top:0in;
	margin-right:0in;
	margin-bottom:0in;
	margin-left:.5in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri","sans-serif";
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri","sans-serif";}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DEN-US link=3Dblue =
vlink=3Dpurple><div class=3DWordSection1><p =
class=3DMsoNormal>Hello,<o:p></o:p></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>I&#8217;m =
trying to run cvs2hg on a very old CVS repository. This repository has =
gone through at least one other conversion tool (mks2cvs) about 10 years =
ago, has had heavy use with CVSNT&#8230; the usual things that will =
probably make you groan.<o:p></o:p></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>Anyway, the =
tool keeps complaining about malformed RCS edits, and I can&#8217;t find =
enough documentation on what constitutes a <i>*well-formed*</i> RCS edit =
to figure out whether it&#8217;s the RCS file at fault or the tool. =
I&#8217;m hoping you can answer a couple of examples for me, and then =
I&#8217;ll know whether I should try to fix the file or the =
tool.<o:p></o:p></p><p class=3DMsoNormal><o:p>&nbsp;</o:p></p><p =
class=3DMsoNormal>Case 1:<o:p></o:p></p><p class=3DMsoNormal>If you have =
a file that ends with a Unix newline (&#8216;\n&#8217;), how many lines =
does it have?<o:p></o:p></p><p class=3DMsoNormal>In other words, should =
an edit for that file look like:<o:p></o:p></p><p class=3DMsoNormal =
style=3D'margin-left:.5in'>@d1 50<o:p></o:p></p><p class=3DMsoNormal =
style=3D'margin-left:.5in'>a50 1<o:p></o:p></p><p class=3DMsoNormal =
style=3D'margin-left:.5in'>This file ends with a newline =
character.<o:p></o:p></p><p class=3DMsoNormal =
style=3D'margin-left:.5in'>@<o:p></o:p></p><p class=3DMsoNormal>Or =
should it look like:<o:p></o:p></p><p class=3DMsoNormal =
style=3D'margin-left:.5in'>@d1 50<o:p></o:p></p><p class=3DMsoNormal =
style=3D'margin-left:.5in'>a50 2<o:p></o:p></p><p class=3DMsoNormal =
style=3D'margin-left:.5in'>This file ends with a newline =
character.<o:p></o:p></p><p class=3DMsoNormal =
style=3D'margin-left:.5in'>@<o:p></o:p></p><p class=3DMsoNormal>Does it =
matter if the file is binary?<o:p></o:p></p><p class=3DMsoNormal>I =
assume that if the file <i>*doesn&#8217;t*</i> end in a newline, then it =
only has 1 line, such as:<o:p></o:p></p><p class=3DMsoNormal =
style=3D'margin-left:.5in'>@d1 50<o:p></o:p></p><p class=3DMsoNormal =
style=3D'margin-left:.5in'>a50 1<o:p></o:p></p><p class=3DMsoNormal =
style=3D'margin-left:.5in'>This file ends right here.@<o:p></o:p></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>Case =
2:<o:p></o:p></p><p class=3DMsoNormal>Does it matter if the =
&#8220;text&#8221; command after the log is on a new line? Or can it =
follow the &#8220;@&#8221; ending the log immediately without a =
newline?<o:p></o:p></p><p class=3DMsoNormal>In other words, is this a =
valid revision?<o:p></o:p></p><p class=3DMsoNormal =
style=3D'margin-left:.5in'>1.5<o:p></o:p></p><p class=3DMsoNormal =
style=3D'margin-left:.5in'>log<o:p></o:p></p><p class=3DMsoNormal =
style=3D'margin-left:.5in'>@ @text<o:p></o:p></p><p class=3DMsoNormal =
style=3D'margin-left:.5in'>@@<o:p></o:p></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>I may have =
more questions, but if you can answer these, or show me where to find =
decent documentation of the format (the best I found was on the Info =
page for Diffutils, but that doesn&#8217;t answer either of these =
questions), I&#8217;d be really grateful.<o:p></o:p></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>-- =
<o:p></o:p></p><p class=3DMsoNormal>Peter Budny<o:p></o:p></p><p =
class=3DMsoNormal>Unicoi Systems<o:p></o:p></p></div></body></html>
------=_NextPart_000_023D_01CDF5A0.A702BF40--