Skip to content
Snippets Groups Projects
Commit 5631b011 authored by Manuel Jacob's avatar Manuel Jacob
Browse files

discovery: fix docstring of `outgoing` class

Also, introduce a more correct name `ancestorsof` for what was named
`missingheads` before. For now, we just forward `ancestorsof` to `missingheads`
until all users are changed.

There were some mistakes in the old docstring / name:

* `missingheads` (new name: `ancestorsof`) contains the revs whose ancestors
  are included in the outgoing operation. It may contain non-head revs and revs
  which are already on the remote, so the name "missingheads" is wrong in two
  ways.
* `missing` contains only ancestors of `missingheads`, so not *all nodes*
  present in local but not in remote.
* `common` might not contain all common revs, e.g. not some that are not an
  ancestor of `missingheads`.

It seems like the misleading name have fostered an actual bug (issue6372),
where `outgoing.missingheads` was used assuming that it contains the heads of
the missing changesets.
parent 75f6491b
No related branches found
No related tags found
No related merge requests found
......@@ -75,8 +75,7 @@
class outgoing(object):
'''Represents the set of nodes present in a local repo but not in a
(possibly) remote one.
'''Represents the result of a findcommonoutgoing() call.
Members:
......@@ -80,9 +79,14 @@
Members:
missing is a list of all nodes present in local but not in remote.
common is a list of all nodes shared between the two repos.
excluded is the list of missing changeset that shouldn't be sent remotely.
missingheads is the list of heads of missing.
ancestorsof is a list of the nodes whose ancestors are included in the
outgoing operation.
missing is a list of those ancestors of ancestorsof that are present in
local but not in remote.
common is a set containing revs common between the local and the remote
repository (at least all of those that are ancestors of ancestorsof).
commonheads is the list of heads of common.
......@@ -87,6 +91,12 @@
commonheads is the list of heads of common.
The sets are computed on demand from the heads, unless provided upfront
excluded is the list of missing changeset that shouldn't be sent
remotely.
missingheads is an alias to ancestorsof, but the name is wrong and it
will be removed
Some members are computed on demand from the heads, unless provided upfront
by discovery.'''
def __init__(
......@@ -135,6 +145,10 @@
self._computecommonmissing()
return self._missing
@property
def ancestorsof(self):
return self.missingheads
def findcommonoutgoing(
repo, other, onlyheads=None, force=False, commoninc=None, portable=False
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment