extension: simplify the extensions helper hierarchy stable
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Thu, 20 Apr 2017 11:41:20 +0200
branchstable
changeset 2275 fff7a678f659
parent 2274 72ba9d4418e0
child 2276 2d55ae0d6ce7
extension: simplify the extensions helper hierarchy If one mode depends on the other, its extensions helper is merged.
hgext3rd/evolve/__init__.py
hgext3rd/evolve/obsexchange.py
hgext3rd/evolve/serveronly.py
--- a/hgext3rd/evolve/__init__.py	Thu Apr 20 11:40:08 2017 +0200
+++ b/hgext3rd/evolve/__init__.py	Thu Apr 20 11:41:20 2017 +0200
@@ -113,7 +113,6 @@
 from . import (
     checkheads,
     debugcmd,
-    obsdiscovery,
     obsexchange,
     exthelper,
     metadata,
@@ -146,7 +145,6 @@
 
 eh = exthelper.exthelper()
 eh.merge(debugcmd.eh)
-eh.merge(obsdiscovery.eh)
 eh.merge(obsexchange.eh)
 eh.merge(checkheads.eh)
 uisetup = eh.final_uisetup
--- a/hgext3rd/evolve/obsexchange.py	Thu Apr 20 11:40:08 2017 +0200
+++ b/hgext3rd/evolve/obsexchange.py	Thu Apr 20 11:41:20 2017 +0200
@@ -39,6 +39,7 @@
 )
 
 eh = exthelper.exthelper()
+eh.merge(obsdiscovery.eh)
 obsexcmsg = utility.obsexcmsg
 obsexcprg = utility.obsexcprg
 
--- a/hgext3rd/evolve/serveronly.py	Thu Apr 20 11:40:08 2017 +0200
+++ b/hgext3rd/evolve/serveronly.py	Thu Apr 20 11:41:20 2017 +0200
@@ -17,7 +17,6 @@
     from . import (
         exthelper,
         metadata,
-        obsdiscovery,
         obsexchange,
     )
 except ValueError as exc:
@@ -28,7 +27,6 @@
     from evolve import (
         exthelper,
         metadata,
-        obsdiscovery,
         obsexchange,
     )
 
@@ -38,7 +36,6 @@
 buglink = metadata.buglink
 
 eh = exthelper.exthelper()
-eh.merge(obsdiscovery.eh)
 eh.merge(obsexchange.eh)
 uisetup = eh.final_uisetup
 extsetup = eh.final_extsetup