compat: from compatibility layer for allprecursors
We only support down to 4.3 now.
--- 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
--- 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