view tests/failfilemerge.py @ 34436:c1fe66e89f57

registrar: fixing typo in comment I was just going through the module and noticed the typo. This commit fixes 'onfalure' -> 'onfailure'. Differential Revision: https://phab.mercurial-scm.org/D906
author Saurabh Singh <singhsrb@fb.com>
date Mon, 02 Oct 2017 19:17:04 +0100
parents c0ce60459d84
children 2372284d9457
line wrap: on
line source

# extension to emulate interrupting filemerge._filemerge

from __future__ import absolute_import

from mercurial import (
    error,
    extensions,
    filemerge,
)

def failfilemerge(filemergefn,
                  premerge, repo, wctx, mynode, orig, fcd, fco, fca,
                  labels=None):
    raise error.Abort("^C")
    return filemergefn(premerge, repo, mynode, orig, fcd, fco, fca, labels)

def extsetup(ui):
    extensions.wrapfunction(filemerge, '_filemerge',
                            failfilemerge)