Mercurial > evolve
changeset 585:f013ca072bd9 stable
evolve: detect and abort if 2.4 is detected
The meaning of critical attribut have changed in 2.4
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Tue, 23 Oct 2012 15:05:32 +0200 |
parents | af3b0d696e7f |
children | f01721161532 |
files | hgext/evolve.py |
diffstat | 1 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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