belaran@976: belaran@976: $ cat controlla_bug_id belaran@976: #!/bin/sh belaran@976: # controlla che un messaggio di commit contenga un identificatore numerico di bug belaran@976: hg log -r $1 --template {desc} | grep -q "\<bug *[0-9]" belaran@976: $ echo 'pretxncommit.bug_id_richiesto = ./controlla_bug_id $HG_NODE' >> .hg/hgrc belaran@976: $ echo a >> a belaran@976: $ hg commit -m "Non ho menzionato alcun identificatore di bug." belaran@976: transazione abortita! belaran@976: ripristino completato belaran@976: fallimento: l'hook pretxncommit.bug_id_richiesto รจ terminato con codice di stato 1 belaran@976: $ hg commit -m "Vi rimando al bug 666." belaran@976: inserito f753cb1e1e77ea944429e1a84d8728e96b41446e belaran@976: data di inserimento: Fri Jun 5 15:50:29 GMT 2009 belaran@976: belaran@976: