--- a/hgext3rd/topic/__init__.py Wed Mar 30 22:04:25 2016 -0700
+++ b/hgext3rd/topic/__init__.py Wed Mar 30 22:05:49 2016 -0700
@@ -90,6 +90,7 @@
destination.modsetup(ui)
topicrevset.modsetup(ui)
discovery.modsetup(ui)
+ setupimportexport(ui)
@contextlib.contextmanager
def usetopicmap(repo):
@@ -347,11 +348,13 @@
if 'topic' in patchdata:
extra['topic'] = patchdata['topic']
-cmdutil.extraexport.append('topic')
-cmdutil.extraexportmap['topic'] = _exporttopic
-cmdutil.extrapreimport.append('topic')
-cmdutil.extrapreimportmap['topic'] = _importtopic
-patch.patchheadermap.append(('EXP-Topic', 'topic'))
+def setupimportexport(ui):
+ """run at ui setup time to install import/export logic"""
+ cmdutil.extraexport.append('topic')
+ cmdutil.extraexportmap['topic'] = _exporttopic
+ cmdutil.extrapreimport.append('topic')
+ cmdutil.extrapreimportmap['topic'] = _importtopic
+ patch.patchheadermap.append(('EXP-Topic', 'topic'))
extensions.afterloaded('rebase', _fixrebase)