obsolete: allprecursors was deprecated
authorBoris Feld <boris.feld@octobus.net>
Fri, 11 Aug 2017 10:52:44 +0200
changeset 2841 7f2943b0c8ea
parent 2840 dfad30be866c
child 2842 2b8b960a04ee
obsolete: allprecursors was deprecated Use allpredecessors instead. Match e6d8ee3c9ec3 mercurial changeset.
hgext3rd/evolve/compat.py
--- a/hgext3rd/evolve/compat.py	Fri Aug 11 10:41:11 2017 +0200
+++ b/hgext3rd/evolve/compat.py	Fri Aug 11 10:52:44 2017 +0200
@@ -73,10 +73,13 @@
     return func(*args, **kwargs)
 
 # 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, 'allprecursors', None)
+    func = getattr(obsutil, 'allpredecessors', None)
     if func is None:
-        func = obsolete.allprecursors
+        func = getattr(obsutil, 'allprecursors', None)
+        if func is None:
+            func = obsolete.allprecursors
     return func(*args, **kwargs)
 
 # compatibility layer for mercurial < 4.3