Show More
@@ -271,12 +271,11 b' def _pushdiscovery(pushop):' | |||
|
271 | 271 | @pushdiscovery('changeset') |
|
272 | 272 | def _pushdiscoverychangeset(pushop): |
|
273 | 273 | """discover the changeset that need to be pushed""" |
|
274 | unfi = pushop.repo.unfiltered() | |
|
275 | 274 | fci = discovery.findcommonincoming |
|
276 |
commoninc = fci( |
|
|
275 | commoninc = fci(pushop.repo, pushop.remote, force=pushop.force) | |
|
277 | 276 | common, inc, remoteheads = commoninc |
|
278 | 277 | fco = discovery.findcommonoutgoing |
|
279 |
outgoing = fco( |
|
|
278 | outgoing = fco(pushop.repo, pushop.remote, onlyheads=pushop.revs, | |
|
280 | 279 | commoninc=commoninc, force=pushop.force) |
|
281 | 280 | pushop.outgoing = outgoing |
|
282 | 281 | pushop.remoteheads = remoteheads |
@@ -927,11 +926,36 b' def _pulldiscoverychangegroup(pullop):' | |||
|
927 | 926 | |
|
928 | 927 | Current handle changeset discovery only, will change handle all discovery |
|
929 | 928 | at some point.""" |
|
930 |
tmp = discovery.findcommonincoming(pullop.repo |
|
|
929 | tmp = discovery.findcommonincoming(pullop.repo, | |
|
931 | 930 | pullop.remote, |
|
932 | 931 | heads=pullop.heads, |
|
933 | 932 | force=pullop.force) |
|
934 |
|
|
|
933 | common, fetch, rheads = tmp | |
|
934 | nm = pullop.repo.unfiltered().changelog.nodemap | |
|
935 | if fetch and rheads: | |
|
936 | # If a remote heads in filtered locally, lets drop it from the unknown | |
|
937 | # remote heads and put in back in common. | |
|
938 | # | |
|
939 | # This is a hackish solution to catch most of "common but locally | |
|
940 | # hidden situation". We do not performs discovery on unfiltered | |
|
941 | # repository because it end up doing a pathological amount of round | |
|
942 | # trip for w huge amount of changeset we do not care about. | |
|
943 | # | |
|
944 | # If a set of such "common but filtered" changeset exist on the server | |
|
945 | # but are not including a remote heads, we'll not be able to detect it, | |
|
946 | scommon = set(common) | |
|
947 | filteredrheads = [] | |
|
948 | for n in rheads: | |
|
949 | if n in nm and n not in scommon: | |
|
950 | common.append(n) | |
|
951 | else: | |
|
952 | filteredrheads.append(n) | |
|
953 | if not filteredrheads: | |
|
954 | fetch = [] | |
|
955 | rheads = filteredrheads | |
|
956 | pullop.common = common | |
|
957 | pullop.fetch = fetch | |
|
958 | pullop.rheads = rheads | |
|
935 | 959 | |
|
936 | 960 | def _pullbundle2(pullop): |
|
937 | 961 | """pull data using bundle2 |
General Comments 0
You need to be logged in to leave comments.
Login now