changeset 2025:d286222293c8

legacy: properly test for mercurial version in the legacy extensions Otherwise 'demandimport' would delay the raising of ImportError.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Thu, 02 Mar 2017 18:13:45 +0100
parents 10d80adec0c2
children 851265d5adc2
files hgext3rd/evolve/legacy.py
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/legacy.py	Thu Mar 02 18:13:20 2017 +0100
+++ b/hgext3rd/evolve/legacy.py	Thu Mar 02 18:13:45 2017 +0100
@@ -17,6 +17,7 @@
 
 try:
     from mercurial import obsolete
+    obsolete._enabled
 except ImportError:
     raise error.Abort('Obsolete extension requires Mercurial 2.3 (or later)')