Changeset 01cfbbba74b0…
Parent 91703c3411ba…
by
Changes to 4 files · Browse files at 01cfbbba74b0 Showing diff from parent 91703c3411ba 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
|
@@ -54,9 +54,6 @@ self.forcepush = False
self.bundle_autoreject = False
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):
@@ -1141,7 +1138,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':
@@ -1149,7 +1146,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)
@@ -1299,7 +1296,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':
@@ -1307,7 +1304,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)
|
@@ -124,6 +124,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...