Source

timestamp / casestop.py

# casestop.py - installs a hook to stop commiting case-folding collisions
#
# Copyright 2009 Friedrich Kastner-Masilko <face@snoopie.at>
#
# This software may be used and distributed according to the terms
# of the GNU General Public License, incorporated herein by reference.

from mercurial import merge

def hook(ui, repo, *args, **kwargs):
    '''hook to stop commiting case-folding collisions'''
    merge._checkcollision(repo[None])

def reposetup(ui, repo):
    ui.setconfig('hooks', 'precommit.casestop', hook)