equal
deleted
inserted
replaced
3020 cl = local.changelog |
3020 cl = local.changelog |
3021 dag = dagutil.revlogdag(cl) |
3021 dag = dagutil.revlogdag(cl) |
3022 missing = set() |
3022 missing = set() |
3023 common = set() |
3023 common = set() |
3024 undecided = set(probeset) |
3024 undecided = set(probeset) |
|
3025 totalnb = len(undecided) |
|
3026 ui.progress("comparing with other", 0, total=totalnb) |
3025 _takefullsample = setdiscovery._takefullsample |
3027 _takefullsample = setdiscovery._takefullsample |
3026 if remote.capable('_evoext_obshash_1'): |
3028 if remote.capable('_evoext_obshash_1'): |
3027 getremotehash = remote.evoext_obshash1 |
3029 getremotehash = remote.evoext_obshash1 |
3028 localhash = _obsrelsethashtreefm1(local) |
3030 localhash = _obsrelsethashtreefm1(local) |
3029 else: |
3031 else: |
3037 sample = set(undecided) |
3039 sample = set(undecided) |
3038 else: |
3040 else: |
3039 sample = _takefullsample(dag, undecided, size=fullsamplesize) |
3041 sample = _takefullsample(dag, undecided, size=fullsamplesize) |
3040 |
3042 |
3041 roundtrips += 1 |
3043 roundtrips += 1 |
|
3044 ui.progress("comparing with other", totalnb - len(undecided), |
|
3045 total=totalnb) |
3042 ui.debug("query %i; still undecided: %i, sample size is: %i\n" |
3046 ui.debug("query %i; still undecided: %i, sample size is: %i\n" |
3043 % (roundtrips, len(undecided), len(sample))) |
3047 % (roundtrips, len(undecided), len(sample))) |
3044 # indices between sample and externalized version must match |
3048 # indices between sample and externalized version must match |
3045 sample = list(sample) |
3049 sample = list(sample) |
3046 remotehash = getremotehash(dag.externalizeall(sample)) |
3050 remotehash = getremotehash(dag.externalizeall(sample)) |
3056 |
3060 |
3057 undecided.difference_update(missing) |
3061 undecided.difference_update(missing) |
3058 undecided.difference_update(common) |
3062 undecided.difference_update(common) |
3059 |
3063 |
3060 |
3064 |
|
3065 ui.progress("comparing with other", None, total=totalnb) |
3061 result = dag.headsetofconnecteds(common) |
3066 result = dag.headsetofconnecteds(common) |
3062 ui.debug("%d total queries\n" % roundtrips) |
3067 ui.debug("%d total queries\n" % roundtrips) |
3063 |
3068 |
3064 if not result: |
3069 if not result: |
3065 return set([nullid]) |
3070 return set([nullid]) |