[cvsnt] Re: how can CVSNT distinguish tag and branch?

Bo Berglund bo.berglund at telia.com
Wed Dec 21 00:41:34 GMT 2005


Community technical support mailing list was retired 2010 and replaced with a professional technical support team. For assistance please contact: Pre-sales Technical support via email to sales@march-hare.com.


On Tue, 20 Dec 2005 23:44:05 +0100, Bo Berglund
<bo.berglund at telia.com> wrote:

>>
>>> %b reports the value "N" (the meaning of which eludes me)
>>
>>I guess it uses the same syntax as the ./CVS/Tag sandbox file, i.e.:
>>
>>N = sticky Non-branch tag
>>T = branch Tag
>>D = sticky Date
>
>Then it does not work for me, the file is definitely on a branch
>rather than sticky.
>
>In that same directory I have files checked out to different branches
>as a test for CVSNT handling of this particular situation...
>

OK, I now understand the thinking behind %b (I believe).

What I did on the file was to create a normal tag on that revision
just to see the arguments passed to taginfo using the OP:s parameter
list.
The taginfo script is invoked whenever one performs a tag oparation
(of course) and in this case I created a tag on a specific revision of
the file, i.e. a sticky tag.
I assume that if I create a branch tag there instead I would receive
"T" as the result of %b.

The fact that the tagged file revision is on a branch does not matter
really, because the created tag is a sticky tag, but located on a
revision that exists in a branch. But that is of no consequence, the
new tag is still a sticky one....

So if one wants to disallow some users from creating branches it would
be entirely possible to use the %b marker and analyze the taginfo call
so that if the response is "T" the script checks the user against a
list of allowed users and if no match it fails the execution and the
tag will not make it into the files.

Also the branch tag format can be checked so that all *branch* tags
will conform to some standard. Maybe branch tags should start with B_
or something similar, then taginfo would fail if %b returns "T" and
the tag value does not start with "B_".


/Bo
(Bo Berglund, developer in Sweden)



More information about the cvsnt mailing list
Download the latest CVSNT, TortosieCVS, WinCVS etc. for Windows 8 etc.
@CVSNT on Twitter   CVSNT on Facebook