Mercurial > evolve
changeset 1825:377d94d6c889
evolve: proactively detect bad version early
The extensions have been providing such error to the user for some time. So we
keep this explicit check (instead of some later errors).
The check is update to match out new version constraint.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Tue, 28 Feb 2017 14:21:17 +0100 |
parents | 542693605fe5 |
children | 19df96c0d670 |
files | hgext3rd/evolve/__init__.py |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/__init__.py Tue Nov 01 16:21:16 2016 +0100 +++ b/hgext3rd/evolve/__init__.py Tue Feb 28 14:21:17 2017 +0100 @@ -76,6 +76,13 @@ import struct sha1re = re.compile(r'\b[0-9a-f]{6,40}\b') +try: + from mercurial import registrar + registrar.templatekeyword # new in hg-3.8 +except ImportError: + raise ImportError('evolve needs version %s or above' % + min(testedwith.split())) + import mercurial from mercurial import util from mercurial import repair