tests: add test coverage for lfdirstate invalidation of linear update stable
authorMads Kiilerich <madski@unity3d.com>
Wed, 31 Dec 2014 14:45:02 +0100
branchstable
changeset 23694 97eb62b0f4a9
parent 23671 e3f30068d2eb
child 23695 997a96cf6344
tests: add test coverage for lfdirstate invalidation of linear update f72d73937853 introduced a significant performance regression: All largefiles are marked 'normallookup' in lfdirstate by linear (or noop) updates and has to be rehashed by the next command. To avoid such regressions, keep an eye on the dirstate content after a plain 'hg up'.
tests/test-largefiles-update.t
--- a/tests/test-largefiles-update.t	Mon Dec 29 14:27:02 2014 -0600
+++ b/tests/test-largefiles-update.t	Wed Dec 31 14:45:02 2014 +0100
@@ -25,6 +25,21 @@
   $ hg commit -m '#2'
   created new head
 
+Test that lfdirstate keeps track of last modification of largefiles and
+prevents unnecessary hashing of content - also after linear/noop update
+
+  $ sleep 1
+  $ hg st
+  $ hg debugdirstate --large --nodate
+  n 644          7 large1
+  n 644         13 large2
+  $ hg up
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ hg debugdirstate --large --nodate
+  n   0         -1 large1
+  n   0         -1 large2
+BAD:            ^^
+
 Test that "hg merge" updates largefiles from "other" correctly
 
 (getting largefiles from "other" normally)