##Tirando uma foto na hora do commit com Mercurial!
Instale o imagesnap
brew install imagesnapNo arquivo ~/.hgrc
[hooks]
commit = commithookCrie o arquivo commithook em algum lugar que esteja no seu PATH, por exemplo criei em ~/bin/commithook
commithook
#!/bin/sh
imagesnap -q $HOME/.commit_shots/$(date -j -f "%a %b %d %T %Z %Y" "`date`" "+%s").jpg &Não esqueça de dar permissão de execução no arquivo:
chmod +x ~/bin/commithookIsso vai salvar as fotos em ~/.commit_shots.
Quem quiser colocar o ~/bin no path, adicione essas linhas no ~/.bash_profile
.bash_profile
export PATH=~/bin:$PATHe atualize o bash
source ~/.bash_profile