changeset 2841:7f2943b0c8ea

obsolete: allprecursors was deprecated Use allpredecessors instead. Match e6d8ee3c9ec3 mercurial changeset.
author Boris Feld <boris.feld@octobus.net>
date Fri, 11 Aug 2017 10:52:44 +0200
parents dfad30be866c
children 2b8b960a04ee
files hgext3rd/evolve/compat.py
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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