##// END OF EJS Templates
copies: add an devel option to trace all files...
marmoute -
r47137:e948ad0d default
parent child Browse files
Show More
@@ -615,6 +615,12 b' coreconfigitem('
615 615 b'check-relroot',
616 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 624 coreconfigitem(
619 625 b'devel',
620 626 b'default-date',
@@ -152,13 +152,21 b' def _committedforwardcopies(a, b, base, '
152 152 if b.p1() == a and b.p2().node() == nullid:
153 153 filesmatcher = matchmod.exact(b.files())
154 154 forwardmissingmatch = matchmod.intersectmatchers(match, filesmatcher)
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:
155 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 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 170 for f in sorted(missing):
163 171 if debug:
164 172 dbg(b'debug.copies: tracing file: %s\n' % f)
@@ -95,6 +95,8 b' Copy a file onto another file'
95 95 x -> y
96 96 $ hg debugpathcopies 0 1
97 97 x -> y (no-filelog !)
98 $ hg debugpathcopies 0 1 --config devel.copy-tracing.trace-all-files=yes
99 x -> y
98 100
99 101 Copy a file onto another file with same content. If metadata is stored in changeset, this does not
100 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 115 x -> x2
114 116 $ hg debugpathcopies 0 1
115 117 x -> x2 (no-filelog !)
118 $ hg debugpathcopies 0 1 --config devel.copy-tracing.trace-all-files=yes
119 x -> x2
116 120
117 121 Rename file in a loop: x->y->z->x
118 122 $ newrepo
@@ -228,6 +228,17 b' should match'
228 228 should show no copies
229 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 242 copy --after on an added file
232 243 $ cp bar baz
233 244 $ hg add baz
General Comments 0
You need to be logged in to leave comments. Login now