comparison tests/test-copies.t @ 46408:e948ad0dcbe2

copies: add an devel option to trace all files Filelog based copy tracing only trace copy for file that have been added. This is a trade off between skipping some rare copy case in exchange for avoiding atrocious-to-the-point-of-unusable performance. The changeset centric copy tracing does not need this trade off and naturally trace all copy, include the one involving non-new files. In order to ease the comparison from both algorithm, we add a small devel option to trace copy for all files in the target revisions. Differential Revision: https://phab.mercurial-scm.org/D9796
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sat, 16 Jan 2021 00:03:18 +0100
parents 1d6d1a15a963
children 86ee73018e62
comparison
equal deleted inserted replaced
46407:095fa99ae5f5 46408:e948ad0dcbe2
93 x y 93 x y
94 $ hg debugp1copies -r 1 94 $ hg debugp1copies -r 1
95 x -> y 95 x -> y
96 $ hg debugpathcopies 0 1 96 $ hg debugpathcopies 0 1
97 x -> y (no-filelog !) 97 x -> y (no-filelog !)
98 $ hg debugpathcopies 0 1 --config devel.copy-tracing.trace-all-files=yes
99 x -> y
98 100
99 Copy a file onto another file with same content. If metadata is stored in changeset, this does not 101 Copy a file onto another file with same content. If metadata is stored in changeset, this does not
100 produce a new filelog entry. The changeset's "files" entry should still list the file. 102 produce a new filelog entry. The changeset's "files" entry should still list the file.
101 $ newrepo 103 $ newrepo
102 $ echo x > x 104 $ echo x > x
111 x x2 113 x x2
112 $ hg debugp1copies -r 1 114 $ hg debugp1copies -r 1
113 x -> x2 115 x -> x2
114 $ hg debugpathcopies 0 1 116 $ hg debugpathcopies 0 1
115 x -> x2 (no-filelog !) 117 x -> x2 (no-filelog !)
118 $ hg debugpathcopies 0 1 --config devel.copy-tracing.trace-all-files=yes
119 x -> x2
116 120
117 Rename file in a loop: x->y->z->x 121 Rename file in a loop: x->y->z->x
118 $ newrepo 122 $ newrepo
119 $ echo x > x 123 $ echo x > x
120 $ hg ci -Aqm 'add x' 124 $ hg ci -Aqm 'add x'