##// END OF EJS Templates
discovery: avoid dropping remote heads hidden locally...
Boris Feld -
r34318:e45ec589 default
parent child Browse files
Show More
@@ -1313,8 +1313,7 b' def _pulldiscoverychangegroup(pullop):'
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
@@ -1324,16 +1323,12 b' def _pulldiscoverychangegroup(pullop):'
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
@@ -520,7 +520,7 b' Both have new stuff in existing named br'
520 "GET /?cmd=heads HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=zstd,zlib,none,bzip2
520 "GET /?cmd=heads HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=zstd,zlib,none,bzip2
521 "GET /?cmd=branches HTTP/1.1" 200 - x-hgarg-1:nodes=d8f638ac69e9ae8dea4f09f11d696546a912d961 x-hgproto-1:0.1 0.2 comp=zstd,zlib,none,bzip2
521 "GET /?cmd=branches HTTP/1.1" 200 - x-hgarg-1:nodes=d8f638ac69e9ae8dea4f09f11d696546a912d961 x-hgproto-1:0.1 0.2 comp=zstd,zlib,none,bzip2
522 "GET /?cmd=between HTTP/1.1" 200 - x-hgarg-1:pairs=d8f638ac69e9ae8dea4f09f11d696546a912d961-d57206cc072a18317c1e381fb60aa31bd3401785 x-hgproto-1:0.1 0.2 comp=zstd,zlib,none,bzip2
522 "GET /?cmd=between HTTP/1.1" 200 - x-hgarg-1:pairs=d8f638ac69e9ae8dea4f09f11d696546a912d961-d57206cc072a18317c1e381fb60aa31bd3401785 x-hgproto-1:0.1 0.2 comp=zstd,zlib,none,bzip2
523 "GET /?cmd=changegroupsubset HTTP/1.1" 200 - x-hgarg-1:bases=d8f638ac69e9ae8dea4f09f11d696546a912d961&heads=d8f638ac69e9ae8dea4f09f11d696546a912d961 x-hgproto-1:0.1 0.2 comp=zstd,zlib,none,bzip2
523 "GET /?cmd=changegroupsubset HTTP/1.1" 200 - x-hgarg-1:bases=d8f638ac69e9ae8dea4f09f11d696546a912d961&heads=d8f638ac69e9ae8dea4f09f11d696546a912d961+2c8d5d5ec612be65cdfdeac78b7662ab1696324a x-hgproto-1:0.1 0.2 comp=zstd,zlib,none,bzip2
524 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=zstd,zlib,none,bzip2
524 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=zstd,zlib,none,bzip2
525 "GET /?cmd=capabilities HTTP/1.1" 200 -
525 "GET /?cmd=capabilities HTTP/1.1" 200 -
526 "GET /?cmd=heads HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=zstd,zlib,none,bzip2
526 "GET /?cmd=heads HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=zstd,zlib,none,bzip2
General Comments 0
You need to be logged in to leave comments. Login now