Search code examples
svncvscvs2svn

Is it possible to restrict branching and tagging in CVS at the server?


We need to convert a production CVS respository to SVN. We are using CVS2SVN for the raw conversion process as well as some other tools.

Because this is a live development repository, the downtime at the repository switchover point is fairly important. Our test runs of the base CVS2SVN conversion are taking approximately 5 days at present, which is too long.

I'm looking some alternative approaches for making the process somewhat incremental. One of the approaches requires that tagging and branching be restricted on the CVS repository.

Is it possible to restrict tagging and branching, but allow normal commits at the CVS repository?


Solution

  • So it turns out that this is possible using the taginfo pre-commit script as detailed in the admin section of the manual here.

    The taginfo File

    What loginfo does for log messages, taginfo does for tags. The left side of taginfo is regular expressions, as usual, and the right side is programs. Each program is automatically handed arguments when CVS tag is invoked, in this order:

    arg 1:          tag name
    arg 2:          operation ("add" => tag, "mov" => tag -F, "del" => tag -d)
    arg 3:          repository
    arg 4, 5, etc:  file revision [file revision ...]
    

    If the program returns nonzero, the tag is aborted.