Show More
@@ -262,7 +262,6 b' def dispatch(ui, args):' | |||||
262 | os.chdir(cwd) |
|
262 | os.chdir(cwd) | |
263 |
|
263 | |||
264 | extensions.loadall(ui) |
|
264 | extensions.loadall(ui) | |
265 | ui.addreadhook(extensions.loadall) |
|
|||
266 |
|
265 | |||
267 | # read the local repository .hgrc into a local ui object |
|
266 | # read the local repository .hgrc into a local ui object | |
268 | # this will trigger its extensions to load |
|
267 | # this will trigger its extensions to load | |
@@ -273,8 +272,9 b' def dispatch(ui, args):' | |||||
273 | try: |
|
272 | try: | |
274 | lui = commands.ui.ui(parentui=ui) |
|
273 | lui = commands.ui.ui(parentui=ui) | |
275 | lui.readconfig(os.path.join(path, ".hg", "hgrc")) |
|
274 | lui.readconfig(os.path.join(path, ".hg", "hgrc")) | |
|
275 | extensions.loadall(lui) | |||
276 | except IOError: |
|
276 | except IOError: | |
277 | pass |
|
277 | extensions.loadall(ui) | |
278 |
|
278 | |||
279 | cmd, func, args, options, cmdoptions = parse(ui, args) |
|
279 | cmd, func, args, options, cmdoptions = parse(ui, args) | |
280 |
|
280 |
@@ -10,7 +10,7 b' from i18n import _' | |||||
10 | import repo, changegroup |
|
10 | import repo, changegroup | |
11 | import changelog, dirstate, filelog, manifest, context |
|
11 | import changelog, dirstate, filelog, manifest, context | |
12 | import re, lock, transaction, tempfile, stat, mdiff, errno, ui |
|
12 | import re, lock, transaction, tempfile, stat, mdiff, errno, ui | |
13 | import os, revlog, time, util |
|
13 | import os, revlog, time, util, extensions | |
14 |
|
14 | |||
15 | class localrepository(repo.repository): |
|
15 | class localrepository(repo.repository): | |
16 | capabilities = ('lookup', 'changegroupsubset') |
|
16 | capabilities = ('lookup', 'changegroupsubset') | |
@@ -76,6 +76,7 b' class localrepository(repo.repository):' | |||||
76 | self.ui = ui.ui(parentui=parentui) |
|
76 | self.ui = ui.ui(parentui=parentui) | |
77 | try: |
|
77 | try: | |
78 | self.ui.readconfig(self.join("hgrc"), self.root) |
|
78 | self.ui.readconfig(self.join("hgrc"), self.root) | |
|
79 | extensions.loadall(self.ui) | |||
79 | except IOError: |
|
80 | except IOError: | |
80 | pass |
|
81 | pass | |
81 |
|
82 |
@@ -32,7 +32,6 b' class ui(object):' | |||||
32 | if parentui is None: |
|
32 | if parentui is None: | |
33 | # this is the parent of all ui children |
|
33 | # this is the parent of all ui children | |
34 | self.parentui = None |
|
34 | self.parentui = None | |
35 | self.readhooks = [] |
|
|||
36 | self.quiet = quiet |
|
35 | self.quiet = quiet | |
37 | self.verbose = verbose |
|
36 | self.verbose = verbose | |
38 | self.debugflag = debug |
|
37 | self.debugflag = debug | |
@@ -52,7 +51,6 b' class ui(object):' | |||||
52 | else: |
|
51 | else: | |
53 | # parentui may point to an ui object which is already a child |
|
52 | # parentui may point to an ui object which is already a child | |
54 | self.parentui = parentui.parentui or parentui |
|
53 | self.parentui = parentui.parentui or parentui | |
55 | self.readhooks = self.parentui.readhooks[:] |
|
|||
56 | self.trusted_users = parentui.trusted_users.copy() |
|
54 | self.trusted_users = parentui.trusted_users.copy() | |
57 | self.trusted_groups = parentui.trusted_groups.copy() |
|
55 | self.trusted_groups = parentui.trusted_groups.copy() | |
58 | self.cdata = dupconfig(self.parentui.cdata) |
|
56 | self.cdata = dupconfig(self.parentui.cdata) | |
@@ -154,11 +152,6 b' class ui(object):' | |||||
154 | if root is None: |
|
152 | if root is None: | |
155 | root = os.path.expanduser('~') |
|
153 | root = os.path.expanduser('~') | |
156 | self.fixconfig(root=root) |
|
154 | self.fixconfig(root=root) | |
157 | for hook in self.readhooks: |
|
|||
158 | hook(self) |
|
|||
159 |
|
||||
160 | def addreadhook(self, hook): |
|
|||
161 | self.readhooks.append(hook) |
|
|||
162 |
|
155 | |||
163 | def readsections(self, filename, *sections): |
|
156 | def readsections(self, filename, *sections): | |
164 | """Read filename and add only the specified sections to the config data |
|
157 | """Read filename and add only the specified sections to the config data |
General Comments 0
You need to be logged in to leave comments.
Login now