tests/test-dirstate-race.t
author Angel Ezquerra <angel.ezquerra@gmail.com>
Sat, 28 Jun 2014 01:42:39 +0200
changeset 21892 89cdebc31cda
parent 12279 28e2e3804f2e
child 32651 c850f0ed54c1
permissions -rw-r--r--
tags: introduce _readtaghist function The existing _readtags function has been modified a little and renamed _readtaghist. A new _readtaghist function has been added, which is a wrappger around _readtaghist. Its output is the same as the old _readtaghist. The purpose of this change is to make it possible to automatically merge tag files. In order to do so we will need to get the line numbers for each of the tag-node pairs on the first merge parent. This is not used yet, but will be used on a follow up patch that will introduce an automatic tag merge algorithm. I performed some tests to compare the effect of this change. I used timeit to run the test-tags.t test a 9 times with and without this patch. The results were: - without this patch: 3 loops, best of 3: 8.55 sec per loop - with this patch: 3 loops, best of 3: 8.49 sec per loop The the test was on average was slightly faster with this patch (although the difference was probably not statistically significant).

  $ hg init
  $ echo a > a
  $ hg add a
  $ hg commit -m test

Do we ever miss a sub-second change?:

  $ for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do
  >     hg co -qC 0
  >     echo b > a
  >     hg st
  > done
  M a
  M a
  M a
  M a
  M a
  M a
  M a
  M a
  M a
  M a
  M a
  M a
  M a
  M a
  M a
  M a
  M a
  M a
  M a
  M a