tests/test-bad-extension.t
author Siddharth Agarwal <sid0@fb.com>
Fri, 27 Mar 2015 01:03:06 -0700
changeset 24486 1a9efc312700
parent 23172 e955549cd045
child 25364 de23a552fc23
permissions -rw-r--r--
dirs.addpath: rework algorithm to search forward This improves performance because it uses strchr rather than a loop. For LLVM/clang version "Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)" on OS X, for a repo with over 200,000 files, this improves perfdirs from 0.248 seconds to 0.230 (7.3%) For gcc 4.4.6 on Linux, for a test repo with over 500,000 files, this improves perfdirs from 0.704 seconds to 0.658 (6.5%).

  $ 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