Discussion:
unknown
1970-01-01 00:00:00 UTC
Permalink
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: info-cvs-bounces+arthur.barrett=march-***@nongnu.org
[mailto:info-cvs-bounces+arthur.barrett=march-***@nongnu.org] On
Behalf Of Pradeep Sharma
Sent: Thursday, 14 May 2009 4:10 PM
To: info-***@nongnu.org
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




------_=_NextPart_001_01C9D48C.FD1D2EB0
Content-Type: text/html;
charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word"><HEAD><TITLE>Message</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.3790.4426" name=GENERATOR>
<STYLE>@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; }
P.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
COLOR: purple; TEXT-DECORATION: underline
}
P {
FONT-SIZE: 12pt; MARGIN-LEFT: 0in; MARGIN-RIGHT: 0in; FONT-FAMILY: "Times New Roman"; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto
}
SPAN.EmailStyle17 {
COLOR: windowtext; FONT-FAMILY: Arial; mso-style-type: personal-compose
}
DIV.Section1 {
page: Section1
}
</STYLE>
</HEAD>
<BODY lang=EN-US vLink=purple link=blue>
<DIV><SPAN class=888015211-14052009><FONT face=Arial color=#0000ff
size=2>Pradeep,</FONT></SPAN></DIV>
<DIV><SPAN class=888015211-14052009><FONT face=Arial color=#0000ff
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=888015211-14052009><FONT face=Arial color=#0000ff size=2>You
are getting into the internals of CVS and RCS which is unwise.&nbsp; There are
actually at least 3 different things: tags, branches and vendor branches - and
CVSNT also has alias tags and magic branches.</FONT></SPAN></DIV>
<DIV><SPAN class=888015211-14052009><FONT face=Arial color=#0000ff
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=888015211-14052009><FONT face=Arial color=#0000ff size=2>From
memory in CVS and CVSNT a tag never has a zero, ie: the first is a branch and
the second a tag:</FONT></SPAN></DIV>
<DIV><SPAN class=888015211-14052009><FONT face=Arial color=#0000ff
size=2>&nbsp;CVSNT_BRANCH_3_1_01_3292: 1.97.0.2<BR>&nbsp;CVSNT_2_5_03_3280:
1.1.2.173.4.219</FONT></SPAN></DIV>
<DIV><SPAN class=888015211-14052009><FONT face=Arial color=#0000ff
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=888015211-14052009><FONT face=Arial color=#0000ff
size=2>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&nbsp;-&nbsp;in this case a
call&nbsp;like "cvs log -N -rCVSNT_2_5_03_3280.&nbsp;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:&nbsp;&nbsp; <BR>&nbsp;&nbsp; warning:
no branch `CVSNT_2_5_03_3280' in
`/repo/path/to/filename.ext,v'<BR></FONT></SPAN></DIV>
<DIV><SPAN class=888015211-14052009><FONT face=Arial color=#0000ff size=2>I
know&nbsp;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...</FONT></SPAN></DIV>
<DIV><SPAN class=888015211-14052009><FONT face=Arial color=#0000ff
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=888015211-14052009><FONT face=Arial color=#0000ff
size=2>Regards,</FONT></SPAN></DIV>
<DIV><SPAN class=888015211-14052009><FONT face=Arial color=#0000ff
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=888015211-14052009><FONT face=Arial color=#0000ff
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=888015211-14052009><FONT face=Arial color=#0000ff size=2>Arthur
Barrett</FONT></SPAN></DIV>
<DIV><SPAN class=888015211-14052009><FONT face=Arial color=#0000ff
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=888015211-14052009><FONT face=Arial color=#0000ff
size=2>&nbsp;</DIV>
<DIV><BR></DIV></FONT></SPAN>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B>
info-cvs-bounces+arthur.barrett=march-***@nongnu.org
[mailto:info-cvs-bounces+arthur.barrett=march-***@nongnu.org] <B>On
Behalf Of </B>Pradeep Sharma<BR><B>Sent:</B> Thursday, 14 May 2009 4:10
PM<BR><B>To:</B> info-***@nongnu.org<BR><B>Subject:</B> How can we find out
which one is tag and which one is branch?<BR><BR></FONT></DIV>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">In CVS, the branch and versions
both, are shown as a string of numerals separated by dot(.)
so<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">How can we find out which one is
tag and which one is branch without any error or ambiguity using shell
script?<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Is there any script, command or
way out?<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">&nbsp;<o:p></o:p></SPAN></FONT></P>
<P><FONT face=Arial size=2><SPAN lang=EN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Thanks and
regards,<BR>Pradeep</SPAN></FONT><FONT face=Arial size=2><SPAN lang=EN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p>&nbsp;</o:p></SPAN></FONT></P></DIV></BLOCKQUOTE></BODY></HTML>

------_=_NextPart_001_01C9D48C.FD1D2EB0--

Loading...