legacy: properly test for mercurial version in the legacy extensions
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Thu, 02 Mar 2017 18:13:45 +0100
changeset 2025 d286222293c8
parent 2024 10d80adec0c2
child 2026 851265d5adc2
legacy: properly test for mercurial version in the legacy extensions Otherwise 'demandimport' would delay the raising of ImportError.
hgext3rd/evolve/legacy.py
--- 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)')