view tests/test-bad-extension.t @ 23220:3f543f6be500

transaction: allow registering a post-close callback The addchangegroup code considers the transaction done after a 'tr.close()' call and schedules the hook's execution for after lock release. In the nested transaction case, the transaction is not yet committed and we must delay this scheduling. We add an 'addpostclose' method (like the 'addpending' and 'addfinalize' ones) that registers code to be run if the transaction is successfully committed.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 28 Oct 2014 14:24:43 +0100
parents e955549cd045
children de23a552fc23
line wrap: on
line source

  $ echo 'raise Exception("bit bucket overflow")' > badext.py
  $ abspath=`pwd`/badext.py

  $ cat <<EOF >> $HGRCPATH
  > [extensions]
  > gpg =
  > hgext.gpg =
  > badext = $abspath
  > badext2 =
  > EOF

  $ hg -q help help
  *** failed to import extension badext from $TESTTMP/badext.py: bit bucket overflow
  *** failed to import extension badext2: No module named badext2
  hg help [-ec] [TOPIC]
  
  show help for a given topic or a help overview