##// END OF EJS Templates
discovery: remove unused "base" argument from find.*incoming()
Benoit Boissinot -
r12760:b41e8dfe default
parent child Browse files
Show More
@@ -9,46 +9,31 b' from node import nullid, short'
9 from i18n import _
9 from i18n import _
10 import util, error
10 import util, error
11
11
12 def findincoming(repo, remote, base=None, heads=None, force=False):
12 def findincoming(repo, remote, heads=None, force=False):
13 """Return list of roots of the subsets of missing nodes from remote
13 """Return list of roots of the subsets of missing nodes from remote
14
14
15 If base dict is specified, assume that these nodes and their parents
16 exist on the remote side and that no child of a node of base exists
17 in both remote and repo.
18 Furthermore base will be updated to include the nodes that exists
19 in repo and remote but no children exists in repo and remote.
20 If a list of heads is specified, return only nodes which are heads
15 If a list of heads is specified, return only nodes which are heads
21 or ancestors of these heads.
16 or ancestors of these heads.
22
17
23 All the ancestors of base are in repo and in remote.
18 All the ancestors of the list returned are in repo and in remote.
24 All the descendants of the list returned are missing in repo.
19 All the descendants of the list returned are missing in repo.
25 (and so we know that the rest of the nodes are missing in remote, see
20 (and so we know that the rest of the nodes are missing in remote, see
26 outgoing)
21 outgoing)
27 """
22 """
28 return findcommonincoming(repo, remote, base, heads, force)[1]
23 return findcommonincoming(repo, remote, heads, force)[1]
29
24
30 def findcommonincoming(repo, remote, base=None, heads=None, force=False):
25 def findcommonincoming(repo, remote, heads=None, force=False):
31 """Return a tuple (common, missing roots, heads) used to identify
26 """Return a tuple (common, missing roots, heads) used to identify
32 missing nodes from remote.
27 missing nodes from remote.
33
28
34 If base dict is specified, assume that these nodes and their parents
35 exist on the remote side and that no child of a node of base exists
36 in both remote and repo.
37 Furthermore base will be updated to include the nodes that exists
38 in repo and remote but no children exists in both repo and remote.
39 In other words, base is the set of heads of the DAG resulting from
40 the intersection of the nodes from repo and remote.
41 If a list of heads is specified, return only nodes which are heads
29 If a list of heads is specified, return only nodes which are heads
42 or ancestors of these heads.
30 or ancestors of these heads.
43
44 All the ancestors of base are in repo and in remote.
45 """
31 """
46 m = repo.changelog.nodemap
32 m = repo.changelog.nodemap
47 search = []
33 search = []
48 fetch = set()
34 fetch = set()
49 seen = set()
35 seen = set()
50 seenbranch = set()
36 seenbranch = set()
51 if base is None:
52 base = {}
37 base = {}
53
38
54 if not heads:
39 if not heads:
General Comments 0
You need to be logged in to leave comments. Login now