Commits

Pierre-Yves David committed f013ca0

evolve: detect and abort if 2.4 is detected

The meaning of critical attribut have changed in 2.4

  • Participants
  • Parent commits af3b0d6
  • Branches stable

Comments (0)

Files changed (1)

File hgext/evolve.py

     if not obsolete._enabled:
         obsolete._enabled = True
 except ImportError:
-    raise util.Abort('Obsolete extension requires Mercurial 2.3 (or later)')
+    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
+
 
 from mercurial import bookmarks
 from mercurial import cmdutil