Non-graft merge hook

Greg Ward greg at gerg.ca
Thu Jan 24 18:28:01 UTC 2013


On 18 January 2013, Mathias De Maré said:
> Hello,
> 
> I'm trying to write a preupdate hook forbidding merges between
> specific branches.
> Doing so seems to work fine and is not too hard.
> 
> However, it seems forbidding merges also forbids grafting.

That doesn't sound right. Merges have two parents, grafts do not.
Perhaps you could show us your code, and then sample output
demonstrating how it fails.

> Is there a way to detect if a merge or a graft is going on?

Like I said: merges have >1 parent.

       Greg
-- 
Greg Ward                            http://www.gerg.ca
<greg at gerg.ca>                       @gergdotca



More information about the Mercurial mailing list