buchuki/gitifyhg — pull request #9 by fingolfin (2013-01-14 19:32:21+00:00)
Title: Notify git about push conflict via remote-helper error code

Besides "already exists", you can also use "non-fast forward". See also function push_update_ref_status() in transport-helper.c in the git sources