comparison mercurial/copies.py @ 48515:19e6446cea11

copies: fix some documentation typos Differential Revision: https://phab.mercurial-scm.org/D11915
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 12 Dec 2021 22:29:46 -0500
parents 74b41e8b3d9c
children 79b904313357
comparison
equal deleted inserted replaced
48514:74b41e8b3d9c 48515:19e6446cea11
287 roots.add(p2) 287 roots.add(p2)
288 if not roots: 288 if not roots:
289 # no common revision to track copies from 289 # no common revision to track copies from
290 return {} 290 return {}
291 if has_graph_roots: 291 if has_graph_roots:
292 # this deal with the special case mentionned in the [1] footnotes. We 292 # this deal with the special case mentioned in the [1] footnotes. We
293 # must filter out revisions that leads to non-common graphroots. 293 # must filter out revisions that leads to non-common graphroots.
294 roots = list(roots) 294 roots = list(roots)
295 m = min(roots) 295 m = min(roots)
296 h = [b.rev()] 296 h = [b.rev()]
297 roots_to_head = cl.reachableroots(m, h, roots, includepath=True) 297 roots_to_head = cl.reachableroots(m, h, roots, includepath=True)
298 roots_to_head = set(roots_to_head) 298 roots_to_head = set(roots_to_head)
299 revs = [r for r in revs if r in roots_to_head] 299 revs = [r for r in revs if r in roots_to_head]
300 300
301 if repo.filecopiesmode == b'changeset-sidedata': 301 if repo.filecopiesmode == b'changeset-sidedata':
302 # When using side-data, we will process the edges "from" the children. 302 # When using side-data, we will process the edges "from" the children.
303 # We iterate over the childre, gathering previous collected data for 303 # We iterate over the children, gathering previous collected data for
304 # the parents. Do know when the parents data is no longer necessary, we 304 # the parents. Do know when the parents data is no longer necessary, we
305 # keep a counter of how many children each revision has. 305 # keep a counter of how many children each revision has.
306 # 306 #
307 # An interresting property of `children_count` is that it only contains 307 # An interesting property of `children_count` is that it only contains
308 # revision that will be relevant for a edge of the graph. So if a 308 # revision that will be relevant for a edge of the graph. So if a
309 # children has parent not in `children_count`, that edges should not be 309 # children has parent not in `children_count`, that edges should not be
310 # processed. 310 # processed.
311 children_count = dict((r, 0) for r in roots) 311 children_count = dict((r, 0) for r in roots)
312 for r in revs: 312 for r in revs: