[cvsnt] Re: Commit notify for commit on certain branch

Thomas Keller me at thomaskeller.biz
Tue Nov 16 13:13:57 GMT 2004


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.


Hi Tony!

> There isn't one branch tag - there can potentially be a different one
> for every file of the commit.  The CVS/Entries file that the commit
> script can see has the current tag for each file.

Yep, I elaborated that, too and thats the most trickiest thing, since
we want to ensure that if a commit is put on a stable trunk this
commit is atomic (all checked in files  have to have the
same branch tag, otherwise the commit should be cancelled),
I mean there is a "hack" where a script could look at the commit 
log entry and parse out some string which let it then send an email,
but this way we still can't assure that no "accidental" commits can
happen on stable branches. I'd like to be able to do something like
this:

a) configure a file with all branches which are stable like
HEAD 
release_1_0
release_1_0-110
..
b) let a commitinfo script check for the branch where a bunch of
files are committed and deny commits if they happen on stable
branches UNLESS these commits contain a special log note like

"MERGE project_xyz_1-0" for merges with other branches

or 

"BUGFIX bugfix_2345" for normal commits (easy bugfixes, stuff where
you don't want to branch your repository)

I think CVS can't distringuish between a normal "commit" and a 
commit which happened after a merge. If it could do that the 
"MERGE ..." log entry may not even need to contain a (maybe wrong
spelled) branch name on which further actions take place but get
this branch name somewhere else.

c) if a branch is committed with "MERGE ..." the desired branch should 
be set read-only automatically

d) set a tag on the stable branch to be able to make diffs between
different feature merges / bugfixes, these tags should be contain the
name of the branch (if a merge took place) or the name of the 
bugfix_<id> thing.

I start to believe that all this can't be accomplished with CVS in a
convinient (not hacked) manner... and I also start to believe that my
little cvs(nt) and perl knowlegde won't be enough for that.

>> Furthermore if this "merge" commit happens  the "unstable" branch
>> should be set to readonly so that no commit  "accidents" happen to
>> this branch. Not quite so important, but a nice to have.
>
> Set a merge ACL on the branch.

The CVSNT manual says in Section security

"Merge (-j)
    Defines that this access entry applies when a merge is attempted from the specified branch. "

So, how does this actually work and what does it enable/disable? The docs 
don't include an example for this option.

Thanks for your support,
Thomas.



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