Re: How can we find out which one is tag and which one is branch?
Larry Jones <[email protected]>
| Newsgroups | gmane.comp.version-control.cvs.general |
|---|---|
| Message-ID | <[email protected]> |
Pradeep Sharma writes: > > 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