Discussion:
How can we find out which one is tag and which one is branch?
Pradeep Sharma
2009-05-14 06:10:24 UTC
Permalink
In CVS, the branch and versions both, are shown as a string of numerals
separated by dot(.) so



How can we find out which one is tag and which one is branch without any
error or ambiguity using shell script?

Is there any script, command or way out?



Thanks and regards,
Pradeep
Arthur Barrett
2009-05-14 12:10:36 UTC
Permalink
Pradeep,

You are getting into the internals of CVS and RCS which is unwise.
There are actually at least 3 different things: tags, branches and
vendor branches - and CVSNT also has alias tags and magic branches.
Larry Jones
2009-05-14 14:29:42 UTC
Permalink
Post by Pradeep Sharma
In CVS, the branch and versions both, are shown as a string of numerals
separated by dot(.) so
How can we find out which one is tag and which one is branch without any
error or ambiguity using shell script?
I'm not sure exactly what you're asking. If the question is, given a
version string, how can you tell whether it refers to a branch or a
revision, the general rule is that an odd number of components is a
branch and an even number of components is a revision. The exception is
that if there is an even number of components but the next to last
component is 0, then it's actually a (magic) branch. So:

1.2.3 - Branch
1.2.3.4 - Revision
1.2.0.1 - Branch (magic)

If that's not the question, you'll need to be more specific about what
you're looking for.
--
Larry Jones

I can feel my brain beginning to atrophy already. -- Calvin
Loading...