tests/test-backwards-remove.t
author Siddharth Agarwal <sid0@fb.com>
Fri, 27 Mar 2015 01:03:06 -0700
changeset 24486 1a9efc312700
parent 12156 4c94b6d0fb1c
child 44724 5c2a4f37eace
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%).

  $ hg init
  $ echo This is file a1 > a
  $ hg add a
  $ hg commit -m "commit #0"
  $ ls
  a
  $ echo This is file b1 > b
  $ hg add b
  $ hg commit -m "commit #1"
  $ hg co 0
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved

B should disappear

  $ ls
  a