# HG changeset patch # User Pierre-Yves David # Date 1351005199 -7200 # Node ID 012e48e80840a64e13efd4b7a5dbf088fb4d5fb6 # Parent 02cadd3dc9f477b82c645b255c7cdecb10371c26 evolve: require Mercurial 2.4 to work diff -r 02cadd3dc9f4 -r 012e48e80840 hgext/evolve.py --- a/hgext/evolve.py Tue Oct 23 17:12:53 2012 +0200 +++ b/hgext/evolve.py Tue Oct 23 17:13:19 2012 +0200 @@ -29,18 +29,11 @@ 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