Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/obsutil.py (4 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
18cf5352aea9 | 802f8ed31ae9 | Pierre-Yves David | Nov 8 2019, 8:20 AM |
Status | Author | Revision | |
---|---|---|---|
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute |
Beware that possible obsolescence cycle may result if complex situation. | Beware that possible obsolescence cycle may result if complex situation. | ||||
""" | """ | ||||
repo = repo.unfiltered() | repo = repo.unfiltered() | ||||
foreground = set(repo.set(b'%ln::', nodes)) | foreground = set(repo.set(b'%ln::', nodes)) | ||||
if repo.obsstore: | if repo.obsstore: | ||||
# We only need this complicated logic if there is obsolescence | # We only need this complicated logic if there is obsolescence | ||||
# XXX will probably deserve an optimised revset. | # XXX will probably deserve an optimised revset. | ||||
nm = repo.changelog.nodemap | has_node = repo.changelog.index.has_node | ||||
plen = -1 | plen = -1 | ||||
# compute the whole set of successors or descendants | # compute the whole set of successors or descendants | ||||
while len(foreground) != plen: | while len(foreground) != plen: | ||||
plen = len(foreground) | plen = len(foreground) | ||||
succs = set(c.node() for c in foreground) | succs = set(c.node() for c in foreground) | ||||
mutable = [c.node() for c in foreground if c.mutable()] | mutable = [c.node() for c in foreground if c.mutable()] | ||||
succs.update(allsuccessors(repo.obsstore, mutable)) | succs.update(allsuccessors(repo.obsstore, mutable)) | ||||
known = (n for n in succs if n in nm) | known = (n for n in succs if has_node(n)) | ||||
foreground = set(repo.set(b'%ln::', known)) | foreground = set(repo.set(b'%ln::', known)) | ||||
return set(c.node() for c in foreground) | return set(c.node() for c in foreground) | ||||
# effectflag field | # effectflag field | ||||
# | # | ||||
# Effect-flag is a 1-byte bit field used to store what changed between a | # Effect-flag is a 1-byte bit field used to store what changed between a | ||||
# changeset and its successor(s). | # changeset and its successor(s). |