Non-graft merge hook
Matt Mackall
mpm at selenic.com
Thu Jan 24 20:34:10 UTC 2013
On Thu, 2013-01-24 at 13:28 -0500, Greg Ward wrote:
> 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.
Graft, like rebase, calls merge internally with two parents (and a
"magic" ancestor). And merge internally calls the hook.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial
mailing list