Hello Ingo,

I used to use branches with number zero for first experimental versions
without problems on Linux. I just assumed, this would be compatible
with OpenRCS. You cited ci(1) with the demanding sentence "Revision
numbering starts at 1.1". The old version of ci(1) in OpenBSD-3.9 says,
that 1.1 is the "default number", which could be interpreted in a more
liberal way, saying that the user has the option to user other values.
OpenBSD-3.9 also had a man page rcsfile(5) with the format of the
RCS file. There I find:

        delta     ::=  num
        ...
        num       ::=  {digit | .}+
        digit     ::=  0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9

That indicates to my opinion, that in the original RCS the digit zero
was allowed.

But trying to reconstruct my data, I now found a more serious problem:

Using the revision numbers 1.1, 1.2, 2.1 for the test script,
version 1.2 becomes inaccessible after ci of revision 2.1,
here the changed script:

### start script2
# init
echo test | rcs -i dummy

# check in rev 1.1
echo dummy1.1 >dummy; ci -r1.1 dummy
echo "# A # check rev 1.1:"
co dummy; cat dummy

# check in rev 1.2
co -l dummy; echo dummy1.2 >>dummy; ci -mr1.2 dummy
echo "# B # check rev 1.2:"
co dummy; cat dummy

# check in rev 2.1
co -l dummy; echo dummy2.1 >>dummy; ci -r2.1 -mr2.1 dummy
echo "# C # check rev 2.1:"
co dummy; cat dummy
echo "# D # check rev 1.2 (FAILS!):"
co -f1.2 dummy; cat dummy
echo "# E # check rev 1.1 (OK!):"
co -f1.1 dummy; cat dummy
### end script2

It seems, that the problem ist not (only) with the use of zeros, but
with the use of different branches. I could get access to the middle
version by editing the RCS file by hand and changing the number 2.1
to 1.3. The same is possible for the first test case: after changing
version 1.1 to 0.3, version 0.2 is accessible again. 
 
Best regards, Bernward.


On 2019-01-13 14:43, Ingo Schwarze wrote:
> Hi Bernward,
> 
> [email protected] wrote on Sat, Jan 12, 2019 at 06:50:29PM +0100:
> 
> > Synopsis:   some revisions < 1.0 become inaccessible after ci r1.1 
> > Description:
> >     Revisions r0.1, r0.2 ??? are accessible,
> >     as long as no revison 1.1 or higher is checked in.
> >     After check in of revision 1.1, only the revisions 1.1 and 0.1
> >     are accessible. A try to check out revison 0.2 gives a message,
> >     that revision 1.1 will be checked out and actually rcs does so.
> 
> As far as i know, RCS and CVS revision numbers are defined as strings
> of dot-separated positive non-zero decimal integers, so if revision
> numbers like "0.1" or "1.0" partially work in some respects, that
> seems an accident to me and not intentional.
> 
> So i wouldn't call this a bug in the code.
> 
> At worst, it might be a documentation issue.
> Then again, rcs(1) already says:
> 
>   $ mkdir RCS
>   $ ci foo.c
>   This command creates an RCS file foo.c,v in the RCS directory,
>   stores foo.c into it as revision 1.1, and deletes foo.c.
> 
> And ci(1) already says:
> 
>   Revision numbering starts at 1.1 and increases logically.
> 
> So i'm not even convinced that the documenation is defective.
> 
> Yours,
>   Ingo

Reply via email to