changeset 3092:ef38b44c08cf stable

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.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 20 Oct 2017 18:50:26 +0200
parents c29a19413e92
children 9c04bd928056
files hgext3rd/evolve/obshistory.py
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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 (