compat: conditionally access config item stable
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 20 Oct 2017 18:56:15 +0200
branchstable
changeset 3093 9c04bd928056
parent 3092 ef38b44c08cf
child 3094 e11e018e8338
compat: conditionally access config item Version 4.2 and below do not have config items support. So the extensions helper do not register anything.
hgext3rd/evolve/__init__.py
--- a/hgext3rd/evolve/__init__.py	Fri Oct 20 18:50:26 2017 +0200
+++ b/hgext3rd/evolve/__init__.py	Fri Oct 20 18:56:15 2017 +0200
@@ -382,7 +382,8 @@
 eh.configitem('experimental', 'prunestrip')
 
 # hack around because we need an actual default there
-configtable['experimental']['evolution.allnewcommands'].default = None
+if configtable:
+    configtable['experimental']['evolution.allnewcommands'].default = None
 
 # pre hg 4.0 compat