# Changeset View

Changeset View

# Standalone View

Standalone View

# mercurial/exchange.py

Show First 20 Lines • Show All 522 Lines • ▼ Show 20 Line(s) | def fallbackheads(self): | ||||

# | # | ||||

# while trying to push we already computed the following: | # while trying to push we already computed the following: | ||||

# common = (::commonheads) | # common = (::commonheads) | ||||

# missing = ((commonheads::missingheads) - commonheads) | # missing = ((commonheads::missingheads) - commonheads) | ||||

# | # | ||||

# We can pick: | # We can pick: | ||||

# * missingheads part of common (::commonheads) | # * missingheads part of common (::commonheads) | ||||

common = self.outgoing.common | common = self.outgoing.common | ||||

nm = self.repo.changelog.nodemap | rev = self.repo.changelog.index.rev | ||||

cheads = [node for node in self.revs if nm[node] in common] | cheads = [node for node in self.revs if rev(node) in common] | ||||

# and | # and | ||||

# * commonheads parents on missing | # * commonheads parents on missing | ||||

revset = unfi.set( | revset = unfi.set( | ||||

b'%ln and parents(roots(%ln))', | b'%ln and parents(roots(%ln))', | ||||

self.outgoing.commonheads, | self.outgoing.commonheads, | ||||

self.outgoing.missing, | self.outgoing.missing, | ||||

) | ) | ||||

cheads.extend(c.node() for c in revset) | cheads.extend(c.node() for c in revset) | ||||

▲ Show 20 Lines • Show All 2550 Lines • Show Last 20 Lines |