RE: How can we find out which one is tag and which one is branch?
"Arthur Barrett" <[email protected]>
| Newsgroups | gmane.comp.version-control.cvs.general |
|---|---|
| Message-ID | <[email protected]> |
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. From memory in CVS and CVSNT a tag never has a zero, ie: the first is a branch and the second a tag: CVSNT_BRANCH_3_1_01_3292: 1.97.0.2 CVSNT_2_5_03_3280: 1.1.2.173.4.219 Whatever you implement outside of CVS itself is certain to eventually be incorrect, my preference is to always recommend to system integrators to call CVS itself to tell you what information you need - in this case a call like "cvs log -N -rCVSNT_2_5_03_3280. filename.ext" should in theory generate a warning if it's not a branch - but I've just done some limited testing and I get rather variable results: warning: no branch `CVSNT_2_5_03_3280' in `/repo/path/to/filename.ext,v' I know for CVSNT in the CVSAPI we have a function that calls rlog and returns an array of structures to tell a calling program what are tags and what are branches - but that's no help to you... Regards, Arthur Barrett -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Pradeep Sharma Sent: Thursday, 14 May 2009 4:10 PM To: [email protected] Subject: How can we find out which one is tag and which one is branch? 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