Show More
@@ -271,12 +271,11 b' def _pushdiscovery(pushop):' | |||||
271 | @pushdiscovery('changeset') |
|
271 | @pushdiscovery('changeset') | |
272 | def _pushdiscoverychangeset(pushop): |
|
272 | def _pushdiscoverychangeset(pushop): | |
273 | """discover the changeset that need to be pushed""" |
|
273 | """discover the changeset that need to be pushed""" | |
274 | unfi = pushop.repo.unfiltered() |
|
|||
275 | fci = discovery.findcommonincoming |
|
274 | fci = discovery.findcommonincoming | |
276 |
commoninc = fci( |
|
275 | commoninc = fci(pushop.repo, pushop.remote, force=pushop.force) | |
277 | common, inc, remoteheads = commoninc |
|
276 | common, inc, remoteheads = commoninc | |
278 | fco = discovery.findcommonoutgoing |
|
277 | fco = discovery.findcommonoutgoing | |
279 |
outgoing = fco( |
|
278 | outgoing = fco(pushop.repo, pushop.remote, onlyheads=pushop.revs, | |
280 | commoninc=commoninc, force=pushop.force) |
|
279 | commoninc=commoninc, force=pushop.force) | |
281 | pushop.outgoing = outgoing |
|
280 | pushop.outgoing = outgoing | |
282 | pushop.remoteheads = remoteheads |
|
281 | pushop.remoteheads = remoteheads | |
@@ -927,11 +926,36 b' def _pulldiscoverychangegroup(pullop):' | |||||
927 |
|
926 | |||
928 | Current handle changeset discovery only, will change handle all discovery |
|
927 | Current handle changeset discovery only, will change handle all discovery | |
929 | at some point.""" |
|
928 | at some point.""" | |
930 |
tmp = discovery.findcommonincoming(pullop.repo |
|
929 | tmp = discovery.findcommonincoming(pullop.repo, | |
931 | pullop.remote, |
|
930 | pullop.remote, | |
932 | heads=pullop.heads, |
|
931 | heads=pullop.heads, | |
933 | force=pullop.force) |
|
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 | def _pullbundle2(pullop): |
|
960 | def _pullbundle2(pullop): | |
937 | """pull data using bundle2 |
|
961 | """pull data using bundle2 |
@@ -172,7 +172,11 b" def decodelist(l, sep=' '):" | |||||
172 | return [] |
|
172 | return [] | |
173 |
|
173 | |||
174 | def encodelist(l, sep=' '): |
|
174 | def encodelist(l, sep=' '): | |
175 | return sep.join(map(hex, l)) |
|
175 | try: | |
|
176 | return sep.join(map(hex, l)) | |||
|
177 | except TypeError: | |||
|
178 | print l | |||
|
179 | raise | |||
176 |
|
180 | |||
177 | # batched call argument encoding |
|
181 | # batched call argument encoding | |
178 |
|
182 |
General Comments 0
You need to be logged in to leave comments.
Login now