compat: handle version where obsutil is not available stable
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 20 Oct 2017 18:50:26 +0200
branchstable
changeset 3092 ef38b44c08cf
parent 3091 c29a19413e92
child 3093 9c04bd928056
compat: handle version where obsutil is not available Version older than 4.3 is do not have the obsutil option. We need to handle that.
hgext3rd/evolve/obshistory.py
--- a/hgext3rd/evolve/obshistory.py	Fri Oct 20 18:19:01 2017 +0200
+++ b/hgext3rd/evolve/obshistory.py	Fri Oct 20 18:50:26 2017 +0200
@@ -17,12 +17,17 @@
     mdiff,
     patch,
     obsolete,
-    obsutil,
     node as nodemod,
     scmutil,
     util,
 )
 
+try:
+    from mercurial import obsutil
+    obsutil.marker
+except ImportError:
+    obsutil = None
+
 from mercurial.i18n import _
 
 from . import (