Details
Details
- Reviewers
Alphare - Group Reviewers
hg-reviewers - Commits
- rHG19e6446cea11: copies: fix some documentation typos
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
No Linters Available - Unit
No Unit Test Coverage
( )
Alphare |
hg-reviewers |
No Linters Available |
No Unit Test Coverage |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/copies.py (6 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
808eef9dc0e3 | ad8a217ff39b | Matt Harbison | Dec 12 2021, 10:29 PM |
Status | Author | Revision | |
---|---|---|---|
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 | ||
Closed | mharbison72 |
if p1 != nullrev and p1 in ancestors: | if p1 != nullrev and p1 in ancestors: | ||||
roots.add(p1) | roots.add(p1) | ||||
if p2 != nullrev and p2 in ancestors: | if p2 != nullrev and p2 in ancestors: | ||||
roots.add(p2) | roots.add(p2) | ||||
if not roots: | if not roots: | ||||
# no common revision to track copies from | # no common revision to track copies from | ||||
return {} | return {} | ||||
if has_graph_roots: | if has_graph_roots: | ||||
# this deal with the special case mentionned in the [1] footnotes. We | # this deal with the special case mentioned in the [1] footnotes. We | ||||
# must filter out revisions that leads to non-common graphroots. | # must filter out revisions that leads to non-common graphroots. | ||||
roots = list(roots) | roots = list(roots) | ||||
m = min(roots) | m = min(roots) | ||||
h = [b.rev()] | h = [b.rev()] | ||||
roots_to_head = cl.reachableroots(m, h, roots, includepath=True) | roots_to_head = cl.reachableroots(m, h, roots, includepath=True) | ||||
roots_to_head = set(roots_to_head) | roots_to_head = set(roots_to_head) | ||||
revs = [r for r in revs if r in roots_to_head] | revs = [r for r in revs if r in roots_to_head] | ||||
if repo.filecopiesmode == b'changeset-sidedata': | if repo.filecopiesmode == b'changeset-sidedata': | ||||
# When using side-data, we will process the edges "from" the children. | # When using side-data, we will process the edges "from" the children. | ||||
# We iterate over the childre, gathering previous collected data for | # We iterate over the children, gathering previous collected data for | ||||
# the parents. Do know when the parents data is no longer necessary, we | # the parents. Do know when the parents data is no longer necessary, we | ||||
# keep a counter of how many children each revision has. | # keep a counter of how many children each revision has. | ||||
# | # | ||||
# An interresting property of `children_count` is that it only contains | # An interesting property of `children_count` is that it only contains | ||||
# revision that will be relevant for a edge of the graph. So if a | # revision that will be relevant for a edge of the graph. So if a | ||||
# children has parent not in `children_count`, that edges should not be | # children has parent not in `children_count`, that edges should not be | ||||
# processed. | # processed. | ||||
children_count = dict((r, 0) for r in roots) | children_count = dict((r, 0) for r in roots) | ||||
for r in revs: | for r in revs: | ||||
for p in cl.parentrevs(r): | for p in cl.parentrevs(r): | ||||
if p == nullrev: | if p == nullrev: | ||||
continue | continue |