comparison tests/test-git-interop.t @ 44951:83e41b73d115

git: add debug logging when there's a mismatch in the cached heads list The dag rebuild can be expensive, so let's try and avoid bugs where it transparently rebuilds all the time for no reason. This would have prevented the issue fixed in D8622. Differential Revision: https://phab.mercurial-scm.org/D8625
author Augie Fackler <augie@google.com>
date Tue, 09 Jun 2020 17:13:26 -0400
parents 03ba7de6a8b9
children d4cf80341589
comparison
equal deleted inserted replaced
44950:f9734b2d59cc 44951:83e41b73d115
34 ? .hg/cache/git-commits.sqlite-wal 34 ? .hg/cache/git-commits.sqlite-wal
35 ? .hg/requires 35 ? .hg/requires
36 $ cd .. 36 $ cd ..
37 37
38 Now globally enable extension for the rest of the test: 38 Now globally enable extension for the rest of the test:
39 $ echo "[extensions]" >> $HGRCPATH 39 $ cat <<EOF >> $HGRCPATH
40 > echo "git=" >> $HGRCPATH 40 > [extensions]
41 > git=
42 > [git]
43 > log-index-cache-miss = yes
44 > EOF
41 45
42 Make a new repo with git: 46 Make a new repo with git:
43 $ mkdir foo 47 $ mkdir foo
44 $ cd foo 48 $ cd foo
45 $ git init 49 $ git init
66 abort: no repository found in '$TESTTMP/foo' (.hg not found)! 70 abort: no repository found in '$TESTTMP/foo' (.hg not found)!
67 [255] 71 [255]
68 But if you run hg init --git, it works: 72 But if you run hg init --git, it works:
69 $ hg init --git 73 $ hg init --git
70 $ hg id --traceback 74 $ hg id --traceback
75 heads mismatch, rebuilding dagcache
71 3d9be8deba43 tip master 76 3d9be8deba43 tip master
72 $ hg status 77 $ hg status
73 ? gamma 78 ? gamma
74 Log works too: 79 Log works too:
75 $ hg log 80 $ hg log
165 170
166 $ echo a >> alpha 171 $ echo a >> alpha
167 $ hg ci -m 'more alpha' --traceback --date '1583522787 18000' 172 $ hg ci -m 'more alpha' --traceback --date '1583522787 18000'
168 $ echo b >> beta 173 $ echo b >> beta
169 $ hg ci -m 'more beta' 174 $ hg ci -m 'more beta'
175 heads mismatch, rebuilding dagcache
170 $ echo a >> alpha 176 $ echo a >> alpha
171 $ hg ci -m 'even more alpha' 177 $ hg ci -m 'even more alpha'
178 heads mismatch, rebuilding dagcache
172 $ hg log -G alpha 179 $ hg log -G alpha
180 heads mismatch, rebuilding dagcache
173 @ changeset: 4:6626247b7dc8 181 @ changeset: 4:6626247b7dc8
174 : bookmark: master 182 : bookmark: master
175 : tag: tip 183 : tag: tip
176 : user: test <test> 184 : user: test <test>
177 : date: Thu Jan 01 00:00:00 1970 +0000 185 : date: Thu Jan 01 00:00:00 1970 +0000
236 244
237 $ git status 245 $ git status
238 On branch master 246 On branch master
239 nothing to commit, working tree clean 247 nothing to commit, working tree clean
240 $ hg status 248 $ hg status
249 heads mismatch, rebuilding dagcache
241 250
242 251
243 node|shortest works correctly 252 node|shortest works correctly
244 $ hg log -T '{node}\n' | sort 253 $ hg log -T '{node}\n' | sort
245 3d9be8deba43482be2c81a4cb4be1f10d85fa8bc 254 3d9be8deba43482be2c81a4cb4be1f10d85fa8bc