# HG changeset patch # User Pierre-Yves David # Date 1524147310 -7200 # Node ID 4819656d113406b8fbc2032426890655e99d339e # Parent 6aff4bb3970d08a60dcf856f5ca4c9955a9f3f97 compat: from compatibility layer for allprecursors We only support down to 4.3 now. diff -r 6aff4bb3970d -r 4819656d1134 hgext3rd/evolve/compat.py --- a/hgext3rd/evolve/compat.py Thu Apr 19 16:12:37 2018 +0200 +++ b/hgext3rd/evolve/compat.py Thu Apr 19 16:15:10 2018 +0200 @@ -38,16 +38,6 @@ eh = exthelper.exthelper() -# allprecursors set move from mercurial.obsolete to mercurial.obsutil in 4.3 -# allprecursors was renamed into allpredecessors in 4.4 -def allprecursors(*args, **kwargs): - func = getattr(obsutil, 'allpredecessors', None) - if func is None: - func = getattr(obsutil, 'allprecursors', None) - if func is None: - func = obsolete.allprecursors - return func(*args, **kwargs) - # compatibility layer for mercurial < 4.3 def bookmarkapplychanges(repo, tr, changes): """Apply a list of changes to bookmarks diff -r 6aff4bb3970d -r 4819656d1134 hgext3rd/evolve/evolvecmd.py --- a/hgext3rd/evolve/evolvecmd.py Thu Apr 19 16:12:37 2018 +0200 +++ b/hgext3rd/evolve/evolvecmd.py Thu Apr 19 16:15:10 2018 +0200 @@ -1019,7 +1019,7 @@ """Compute sets of commits divergent with a given one""" cache = {} base = {} - for n in compat.allprecursors(repo.obsstore, [ctx.node()]): + for n in obsutil.allpredecessors(repo.obsstore, [ctx.node()]): if n == ctx.node(): # a node can't be a base for divergence with itself continue