Mercurial > hg
comparison tests/test-commandserver.t @ 34765:f3e4a5ad0d90
configitems: register the test 'failafterfinalize.fail' config
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Fri, 13 Oct 2017 23:53:06 +0200 |
parents | 989e884d1be9 |
children | d45236f3d38e |
comparison
equal
deleted
inserted
replaced
34764:af43cb56af4e | 34765:f3e4a5ad0d90 |
---|---|
806 cases. | 806 cases. |
807 | 807 |
808 $ cat > $TESTTMP/failafterfinalize.py <<EOF | 808 $ cat > $TESTTMP/failafterfinalize.py <<EOF |
809 > # extension to abort transaction after finalization forcibly | 809 > # extension to abort transaction after finalization forcibly |
810 > from mercurial import commands, error, extensions, lock as lockmod | 810 > from mercurial import commands, error, extensions, lock as lockmod |
811 > from mercurial import registrar | |
812 > cmdtable = {} | |
813 > command = registrar.command(cmdtable) | |
814 > configtable = {} | |
815 > configitem = registrar.configitem(configtable) | |
816 > configitem('failafterfinalize', 'fail', | |
817 > default=None, | |
818 > ) | |
811 > def fail(tr): | 819 > def fail(tr): |
812 > raise error.Abort('fail after finalization') | 820 > raise error.Abort('fail after finalization') |
813 > def reposetup(ui, repo): | 821 > def reposetup(ui, repo): |
814 > class failrepo(repo.__class__): | 822 > class failrepo(repo.__class__): |
815 > def commitctx(self, ctx, error=False): | 823 > def commitctx(self, ctx, error=False): |