Detecting incoming merge/conflicts before they get pulled

Thomas Arendsen Hein thomas at intevation.de
Sat Dec 2 05:33:29 CST 2006


* Kelly O'Hair <Kelly.Ohair at sun.com> [20061130 23:31]:
> If outgoing and incoming are non empty, that doesn't mean
> you will have merge conflicting changes in files though.
> That's what I'm after, "Will files need to be merged due to
> changesets changing the same file".

If you sed ui.merge = false (or environment HGMERGE=false), no
automatic merging of files is attempted.

You can then use the pretxnchangegroup hook with something like:

[hooks]
pretxnchangegroup = { hg update || hg merge; } >&2

(redirect stdout to stderr if you want to use ssh push, because
stdout is used for the data stream)

Maybe you have to clean up the working directory on failure with
'hg update -C' to the previous working directory parent (tip
without the new changesets), I haven't tested this.

Thomas

-- 
Email: thomas at intevation.de
http://intevation.de/~thomas/


More information about the Mercurial mailing list