info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Explicit revision numbers


From: Mark D. Baushke
Subject: Re: Explicit revision numbers
Date: Fri, 22 Sep 2006 01:15:34 -0700

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Holger <address@hidden> writes:

> Mark D. Baushke wrote:
> > If someone has done a 'cvs admin -o1.23' after revision 1.24 exists,
> > then your script will do the wrong thing as the predecessor revision
> > will be 1.22 rather than 1.23. This of course is concerned with finding
> > the predecessor of revisions that already exist in the repository.
> >
> > > My question:
> > > IRC I've read somewhere that you are able to explicitely specify new
> > > revision number - e.g bump the major number - when checking in. Is this
> > > still true?
> >
> > Probably, but do not use it. CVS revision numbers are for use by CVS
> > internals and it is entirely possible to break fundamental assumptions
> > when you try to do tricky things with them.
> >
> > > Is there a better way than the above to figure prevrev out?
> >
> > Better? I suppose that depends on what you mean. You could process
> >
> >   cvs rlog -N -r:1.24 module/subdir/filename
> 
> I tried this - but it does not tell you what the previous version is.

I believe you are mistaken. The order of the revisions provided are in
reverse chronological order. If you start at the revision obtained via a
'cvs status' command, you will be able to determine the previous revision
if it is on the current branch. If it is a revision like 1.24.2.1, and
the 'cvs rlog -N -r:1.24.2.1 module/subdir/filename' command only prints
out the entry for 1.24.2.1, then you would need to strip the .2.1 and try
beginning from -r:1.24 to see what the first revision printed would be.

> My conclusion is that it is not possible with the current CVS
> functionality to reliably determine the previous version. And the best
> shot I have is the algoritm described in previous post - depending on
> my fellow CVS users to not manipulate the revision numbers.
> Oh well, as you wrote, people should leave the versioning to the
> internals of CVS. And I'll have to rely on that.

        Good luck,
        -- Mark
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (FreeBSD)

iD8DBQFFE5umCg7APGsDnFERAkXMAJ9wdLjxsNeSuJ3sDReBqZfzg0M/xgCg2Wn2
nwBl90pju6XG+6PE3nnGaqs=
=H3BB
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]