evolve: detect and abort if 2.4 is detected
The meaning of critical attribut have changed in 2.4
--- a/hgext/evolve.py Tue Oct 23 15:03:25 2012 +0200
+++ b/hgext/evolve.py Tue Oct 23 15:05:32 2012 +0200
@@ -32,7 +32,16 @@
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