compat: ignore extra status feature for hg <= 4.3 stable
authorPierre-Yves David <pierre-yves.david@octobus.net>
Thu, 02 Aug 2018 03:08:52 +0200
branchstable
changeset 3926 35172bd95e57
parent 3925 3c2a464ae6fc
child 3927 b4589df6d3aa
compat: ignore extra status feature for hg <= 4.3 The feature does not exist in 4.3 and below.
hgext3rd/evolve/__init__.py
--- a/hgext3rd/evolve/__init__.py	Thu Aug 02 02:41:33 2018 +0200
+++ b/hgext3rd/evolve/__init__.py	Thu Aug 02 03:08:52 2018 +0200
@@ -1409,9 +1409,10 @@
     cmdutil.afterresolvedstates.append(afterresolved)
     cmdutil.afterresolvedstates.append(grabresolved)
 
-    statedata = ('evolve', cmdutil.fileexistspredicate('evolvestate'),
-                 _evolvemessage)
-    cmdutil.STATES = (statedata, ) + cmdutil.STATES
+    if util.safehasattr(cmdutil, 'STATES'):
+        statedata = ('evolve', cmdutil.fileexistspredicate('evolvestate'),
+                     _evolvemessage)
+        cmdutil.STATES = (statedata, ) + cmdutil.STATES
 
 @eh.wrapfunction(hg, 'clean')
 def clean(orig, repo, *args, **kwargs):