uisetup: move all remaining wrapping into uisetup
authorPierre-Yves David <pierre-yves.david@fb.com>
Wed, 30 Mar 2016 22:33:06 -0700
changeset 1951 0309cac5d91d
parent 1950 99c1a26abf3f
child 1952 665d6322994e
uisetup: move all remaining wrapping into uisetup All our wrapping is now properly done at uisetup time. Hooray.
hgext3rd/topic/__init__.py
--- a/hgext3rd/topic/__init__.py	Wed Mar 30 22:31:24 2016 -0700
+++ b/hgext3rd/topic/__init__.py	Wed Mar 30 22:33:06 2016 -0700
@@ -90,6 +90,17 @@
     discovery.modsetup(ui)
     setupimportexport(ui)
 
+    extensions.afterloaded('rebase', _fixrebase)
+
+    entry = extensions.wrapcommand(commands.table, 'commit', commitwrap)
+    entry[1].append(('t', 'topic', '',
+                     _("use specified topic"), _('TOPIC')))
+
+    extensions.wrapfunction(cmdutil, 'buildcommittext', committextwrap)
+    extensions.wrapfunction(merge, 'update', mergeupdatewrap)
+    cmdutil.summaryhooks.add('topic', summaryhook)
+
+
 def reposetup(ui, repo):
     orig = repo.__class__
     if not isinstance(repo, localrepo.localrepository):
@@ -329,14 +340,3 @@
     cmdutil.extrapreimport.append('topic')
     cmdutil.extrapreimportmap['topic'] = _importtopic
     patch.patchheadermap.append(('EXP-Topic', 'topic'))
-
-extensions.afterloaded('rebase', _fixrebase)
-
-entry = extensions.wrapcommand(commands.table, 'commit', commitwrap)
-entry[1].append(('t', 'topic', '',
-                 _("use specified topic"), _('TOPIC')))
-
-extensions.wrapfunction(cmdutil, 'buildcommittext', committextwrap)
-extensions.wrapfunction(merge, 'update', mergeupdatewrap)
-cmdutil.summaryhooks.add('topic', summaryhook)
-