The Vesta developers have a convention for annotating branches with an attribute. See DevelopingVesta/BranchStatus for a description.

When a checkin includes a merge from a branch, it's common to want to mark that branch as "closed". This helps developers by allowing them to look at only the "open" branches.

The following shell script is designed to be used as a post-vcheckin trigger. It will run the set-branch-status.py script for any branch that has had one of its versions merged into the version that was just checked in. That script will then offer to set the branch status attribute.


# Loop over any versions merged into this checkout
for version in `vattrib -g merged-versions $VESTA_NEW_VERSION`; do
  # Check to see if it's in a branch
  branch=`dirname $version`
  if vattrib -q -i type branch $branch; then
    # Offer to set the branch status and update the central repository.
    set-branch-status.py --update dev.vestasys.org $branch
  fi
done 

(Obviously you may want to remove or change "--update dev.vestasys.org".)