Commits

Pierre-Yves David committed 012e48e

evolve: require Mercurial 2.4 to work

  • Participants
  • Parent commits 02cadd3
  • Branches default

Comments (0)

Files changed (1)

File hgext/evolve.py

 
 try:
     from mercurial import obsolete
+    getattr(obsolete, 'getrevs') # 2.4 specific
     if not obsolete._enabled:
         obsolete._enabled = True
-except ImportError:
-    raise util.Abort('Evolve extension requires Mercurial 2.3 (or later)')
-
-try:
-    getattr(obsolete, 'getrevs') # 2.4 specific
-    raise util.Abort('Your version of Mercurial is too recent for this '
-                     'version of evolve',
-                     hint="upgrade your evolve")
-except AttributeError:
-    pass
+except (ImportError, AttributeError):
+    raise util.Abort('Evolve extension requires Mercurial 2.4 (or later)')
 
 
 from mercurial import bookmarks