1311 heads=pullop.heads, |
1311 heads=pullop.heads, |
1312 force=pullop.force) |
1312 force=pullop.force) |
1313 common, fetch, rheads = tmp |
1313 common, fetch, rheads = tmp |
1314 nm = pullop.repo.unfiltered().changelog.nodemap |
1314 nm = pullop.repo.unfiltered().changelog.nodemap |
1315 if fetch and rheads: |
1315 if fetch and rheads: |
1316 # If a remote heads in filtered locally, lets drop it from the unknown |
1316 # If a remote heads is filtered locally, put in back in common. |
1317 # remote heads and put in back in common. |
|
1318 # |
1317 # |
1319 # This is a hackish solution to catch most of "common but locally |
1318 # This is a hackish solution to catch most of "common but locally |
1320 # hidden situation". We do not performs discovery on unfiltered |
1319 # hidden situation". We do not performs discovery on unfiltered |
1321 # repository because it end up doing a pathological amount of round |
1320 # repository because it end up doing a pathological amount of round |
1322 # trip for w huge amount of changeset we do not care about. |
1321 # trip for w huge amount of changeset we do not care about. |
1323 # |
1322 # |
1324 # If a set of such "common but filtered" changeset exist on the server |
1323 # If a set of such "common but filtered" changeset exist on the server |
1325 # but are not including a remote heads, we'll not be able to detect it, |
1324 # but are not including a remote heads, we'll not be able to detect it, |
1326 scommon = set(common) |
1325 scommon = set(common) |
1327 filteredrheads = [] |
|
1328 for n in rheads: |
1326 for n in rheads: |
1329 if n in nm: |
1327 if n in nm: |
1330 if n not in scommon: |
1328 if n not in scommon: |
1331 common.append(n) |
1329 common.append(n) |
1332 else: |
1330 if set(rheads).issubset(set(common)): |
1333 filteredrheads.append(n) |
|
1334 if not filteredrheads: |
|
1335 fetch = [] |
1331 fetch = [] |
1336 rheads = filteredrheads |
|
1337 pullop.common = common |
1332 pullop.common = common |
1338 pullop.fetch = fetch |
1333 pullop.fetch = fetch |
1339 pullop.rheads = rheads |
1334 pullop.rheads = rheads |
1340 |
1335 |
1341 def _pullbundle2(pullop): |
1336 def _pullbundle2(pullop): |