by
Changes to 4 files · Browse files at 3372580e0163 Showing diff from parent 0d30a9d62bbb 01cfbbba74b0 Diff from another changeset...
@@ -179,7 +179,7 @@ hbox.pack_start(gtk.Label(_('Subject:')), False, False, 4)
hbox.pack_start(self._subjbox, True, True, 4)
- extensions.load(ui.ui(), 'patchbomb', None)
+ hglib.loadextension(ui.ui(), 'patchbomb')
# --flags was added after hg 1.3
hasflags = False
|
@@ -139,9 +139,6 @@ self.bundle_autoreject = False
self.runner = hgcmd.CmdRunner()
os.chdir(self.repo.root)
-
- # Load extension support for commands which need it
- extensions.loadall(self.ui)
self.exs = [ name for name, module in extensions.extensions() ]
def get_help_url(self):
@@ -1247,7 +1244,7 @@ if ppull == 'fetch':
cmd = ['fetch', '--message', 'merge']
# load the fetch extension explicitly
- extensions.load(self.ui, 'fetch', None)
+ hglib.loadextension(self.ui, 'fetch')
else:
cmd = ['pull']
if ppull == 'update':
@@ -1255,7 +1252,7 @@ elif ppull == 'rebase':
cmd.append('--rebase')
# load the rebase extension explicitly
- extensions.load(self.ui, 'rebase', None)
+ hglib.loadextension(self.ui, 'rebase')
cmdline = ['hg'] + cmd + [self.bfile]
dlg = hgcmd.CmdDialog(cmdline)
@@ -1419,7 +1416,7 @@ if ppull == 'fetch':
cmd = ['fetch', '--message', 'merge']
# load the fetch extension explicitly
- extensions.load(self.ui, 'fetch', None)
+ hglib.loadextension(self.ui, 'fetch')
else:
cmd = ['pull']
if ppull == 'update':
@@ -1427,7 +1424,7 @@ elif ppull == 'rebase':
cmd.append('--rebase')
# load the rebase extension explicitly
- extensions.load(self.ui, 'rebase', None)
+ hglib.loadextension(self.ui, 'rebase')
path = hglib.fromutf(self.pathentry.get_text()).strip()
remote_path = hglib.validate_synch_path(path, self.repo)
|
@@ -147,7 +147,6 @@ elif defrow is not None:
self.pathbox.set_active(defrow)
- extensions.loadall(self.ui)
exs = [ name for name, module in extensions.extensions() ]
# Post Pull Operation
@@ -445,7 +444,7 @@ if ppull == 'fetch':
cmd = ['fetch', '--message', 'merge']
# load the fetch extension explicitly
- extensions.load(self.ui, 'fetch', None)
+ hglib.loadextension(self.ui, 'fetch')
else:
cmd = ['pull']
cmd += aopts.get('force', [])
@@ -455,7 +454,7 @@ elif ppull == 'rebase':
cmd.append('--rebase')
# load the rebase extension explicitly
- extensions.load(self.ui, 'rebase', None)
+ hglib.loadextension(self.ui, 'rebase')
cmd += aopts.get('rev', [])
self.exec_cmd(cmd)
|
@@ -125,6 +125,16 @@ if 'mq' in repo.__dict__: #do not create if it does not exist
repo.mq.invalidate()
+def loadextension(ui, name):
+ # Between Mercurial revisions 1.2 and 1.3, extensions.load() stopped
+ # calling uisetup() after loading an extension. This could do
+ # unexpected things if you use an hg version < 1.3
+ extensions.load(ui, name, None)
+ mod = extensions.find(name)
+ uisetup = getattr(mod, 'uisetup', None)
+ if uisetup:
+ uisetup(ui)
+
def canonpaths(list):
'Get canonical paths (relative to root) for list of files'
# This is a horrible hack. Please remove this when HG acquires a
|
Loading...