changeset 1191:583f7f03434b stable

init: don't abort Mercurial on version mismatch Evolve causes Mercurial to exit if there is a version mismatch, even if no evolve command is invoked. This is a headache for people who have to work with multiple versions of Mercurial. Instead, raise an ImportError, which gives a warning but otherwise allows Mercurial to run non-evolve commands.
author Matt Mackall <mpm@selenic.com>
date Tue, 23 Dec 2014 14:29:16 -0600
parents 1df0bf41016c
children a556fff7adcf aa7cdd9d7310
files README hgext/evolve.py
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/README	Sun Dec 14 12:45:04 2014 -0800
+++ b/README	Tue Dec 23 14:29:16 2014 -0600
@@ -51,6 +51,10 @@
 Changelog
 =========
 
+5.0.3 --
+
+- evolve: don't abort Mercurial on version mismatch
+
 5.0.2 -- 2014-12-14
 
 - evolve: remove dependency to the rebase extension
--- a/hgext/evolve.py	Sun Dec 14 12:45:04 2014 -0800
+++ b/hgext/evolve.py	Tue Dec 23 14:29:16 2014 -0600
@@ -85,8 +85,7 @@
     def memfilectx(repo, *args, **kwargs):
         return oldmemfilectx(*args, **kwargs)
 else:
-    raise util.Abort('Your Mercurial is too old for this version of Evolve\n'
-                     'requires version %s or above' % min(testedwith.split()))
+    raise ImportError('evolve needs version %s or above' % min(testedwith.split()))
 
 
 # This extension contains the following code