tests/test-extension.t
changeset 32723 b6384b3d4ebe
parent 32343 d47d7d3bd07b
child 32724 ea1c2eb7abd3
equal deleted inserted replaced
32722:de09138bf0f5 32723:b6384b3d4ebe
  1604   > EOF
  1604   > EOF
  1605 
  1605 
  1606   $ hg --config extensions.nonregistrar=`pwd`/nonregistrar.py version > /dev/null
  1606   $ hg --config extensions.nonregistrar=`pwd`/nonregistrar.py version > /dev/null
  1607   devel-warn: cmdutil.command is deprecated, use registrar.command to register 'foo'
  1607   devel-warn: cmdutil.command is deprecated, use registrar.command to register 'foo'
  1608   (compatibility will be dropped after Mercurial-4.6, update your code.) * (glob)
  1608   (compatibility will be dropped after Mercurial-4.6, update your code.) * (glob)
       
  1609 
       
  1610 Make sure a broken uisetup doesn't globally break hg:
       
  1611   $ cat > baduisetup.py <<EOF
       
  1612   > from mercurial import (
       
  1613   >     bdiff,
       
  1614   >     extensions,
       
  1615   > )
       
  1616   > 
       
  1617   > def blockswrapper(orig, *args, **kwargs):
       
  1618   >     return orig(*args, **kwargs)
       
  1619   > 
       
  1620   > def uisetup(ui):
       
  1621   >     extensions.wrapfunction(bdiff, 'blocks', blockswrapper)
       
  1622   > EOF
       
  1623   $ cat >> $HGRCPATH <<EOF
       
  1624   > [extensions]
       
  1625   > baduisetup = $PWD/baduisetup.py
       
  1626   > EOF
       
  1627 
       
  1628 Broken: an extension that triggers the import of bdiff during uisetup
       
  1629 can't be easily debugged:
       
  1630   $ hg version
       
  1631   abort: No module named bdiff!
       
  1632   (did you forget to compile extensions?)
       
  1633   [255]