Show More
@@ -615,6 +615,12 b' coreconfigitem(' | |||||
615 | b'check-relroot', |
|
615 | b'check-relroot', | |
616 | default=False, |
|
616 | default=False, | |
617 | ) |
|
617 | ) | |
|
618 | # Track copy information for all file, not just "added" one (very slow) | |||
|
619 | coreconfigitem( | |||
|
620 | b'devel', | |||
|
621 | b'copy-tracing.trace-all-files', | |||
|
622 | default=False, | |||
|
623 | ) | |||
618 | coreconfigitem( |
|
624 | coreconfigitem( | |
619 | b'devel', |
|
625 | b'devel', | |
620 | b'default-date', |
|
626 | b'default-date', |
@@ -152,13 +152,21 b' def _committedforwardcopies(a, b, base, ' | |||||
152 | if b.p1() == a and b.p2().node() == nullid: |
|
152 | if b.p1() == a and b.p2().node() == nullid: | |
153 | filesmatcher = matchmod.exact(b.files()) |
|
153 | filesmatcher = matchmod.exact(b.files()) | |
154 | forwardmissingmatch = matchmod.intersectmatchers(match, filesmatcher) |
|
154 | forwardmissingmatch = matchmod.intersectmatchers(match, filesmatcher) | |
155 | missing = _computeforwardmissing(a, b, match=forwardmissingmatch) |
|
155 | if repo.ui.configbool(b'devel', b'copy-tracing.trace-all-files'): | |
|
156 | missing = list(b.walk(match)) | |||
|
157 | # _computeforwardmissing(a, b, match=forwardmissingmatch) | |||
|
158 | if debug: | |||
|
159 | dbg(b'debug.copies: searching all files: %d\n' % len(missing)) | |||
|
160 | else: | |||
|
161 | missing = _computeforwardmissing(a, b, match=forwardmissingmatch) | |||
|
162 | if debug: | |||
|
163 | dbg( | |||
|
164 | b'debug.copies: missing files to search: %d\n' | |||
|
165 | % len(missing) | |||
|
166 | ) | |||
156 |
|
167 | |||
157 | ancestrycontext = a._repo.changelog.ancestors([b.rev()], inclusive=True) |
|
168 | ancestrycontext = a._repo.changelog.ancestors([b.rev()], inclusive=True) | |
158 |
|
169 | |||
159 | if debug: |
|
|||
160 | dbg(b'debug.copies: missing files to search: %d\n' % len(missing)) |
|
|||
161 |
|
||||
162 | for f in sorted(missing): |
|
170 | for f in sorted(missing): | |
163 | if debug: |
|
171 | if debug: | |
164 | dbg(b'debug.copies: tracing file: %s\n' % f) |
|
172 | dbg(b'debug.copies: tracing file: %s\n' % f) |
@@ -95,6 +95,8 b' Copy a file onto another file' | |||||
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. | |
@@ -113,6 +115,8 b' produce a new filelog entry. The changes' | |||||
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 |
@@ -228,6 +228,17 b' should match' | |||||
228 | should show no copies |
|
228 | should show no copies | |
229 | $ hg st -C |
|
229 | $ hg st -C | |
230 |
|
230 | |||
|
231 | note: since filelog based copy tracing only trace copy for new file, the copy information here is not displayed. | |||
|
232 | ||||
|
233 | $ hg status --copies --change . | |||
|
234 | M bar | |||
|
235 | ||||
|
236 | They are a devel option to walk all file and fine this information anyway. | |||
|
237 | ||||
|
238 | $ hg status --copies --change . --config devel.copy-tracing.trace-all-files=yes | |||
|
239 | M bar | |||
|
240 | foo | |||
|
241 | ||||
231 | copy --after on an added file |
|
242 | copy --after on an added file | |
232 | $ cp bar baz |
|
243 | $ cp bar baz | |
233 | $ hg add baz |
|
244 | $ hg add baz |
General Comments 0
You need to be logged in to leave comments.
Login now