author Johnathan Nightingale <>
Thu, 13 Aug 2009 11:45:13 -0400
changeset 18 5410ccbb1e43d1e7833d34b0ae4552f85b6daa6d
parent 9 d1ffa7f6da595c782e71e9a54d47e12fa00e4077
child 24 ca7bc6fd9af4092975a72b9d30a3f29bdf73dab6
permissions -rwxr-xr-x
Add APPROVAL REQUIRED hook for trees that... require approval. r=bsmedberg Silent on success, message and rejection on failure to include a=...

#!/usr/bin/env python

def hook(ui, repo, **kwargs):
    for b in repo.branchtags():
        if len(repo.branchheads(b)) > 1:
            print "Two heads detected on branch '%s'" % b
            print "Only one head per branch is allowed!"
            return 1
    return 0