# HG changeset patch # User Pierre-Yves David # Date 1350997532 -7200 # Node ID f013ca072bd9f5d8e488e19610d9f1562bef3ea2 # Parent af3b0d696e7f43b9cfb18b816e0e3fa7482e39d9 evolve: detect and abort if 2.4 is detected The meaning of critical attribut have changed in 2.4 diff -r af3b0d696e7f -r f013ca072bd9 hgext/evolve.py --- 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