# HG changeset patch # User Pierre-Yves David # Date 1537229650 -7200 # Node ID eea339cf4d30fa0c2cc97779e3d5d014384c6fa4 # Parent d3ea35ad88f35c158070077b83fa66e5f708940f# Parent c4b891fe44c3a4b487b2b2c92b8aada57c4c79aa branching: merge with stable diff -r d3ea35ad88f3 -r eea339cf4d30 hgext3rd/evolve/obsdiscovery.py --- a/hgext3rd/evolve/obsdiscovery.py Fri Sep 14 12:21:32 2018 +0200 +++ b/hgext3rd/evolve/obsdiscovery.py Tue Sep 18 02:14:10 2018 +0200 @@ -24,6 +24,7 @@ import hashlib import heapq +import inspect import sqlite3 import struct import weakref @@ -110,7 +111,13 @@ if len(undecided) < fullsamplesize: sample = set(undecided) else: - sample = _takefullsample(dag, undecided, size=fullsamplesize) + # Mercurial 4.8 changed calling convention. + if len(inspect.getargspec(_takefullsample)[0]) == 4: + sample = _takefullsample(local, None, undecided, + size=fullsamplesize) + else: + # hg <= 4.7 version + sample = _takefullsample(dag, undecided, size=fullsamplesize) roundtrips += 1 ui.progress(_("comparing with other"), totalnb - len(undecided),