Show More
@@ -35,6 +35,7 b' from .. import (' | |||
|
35 | 35 | pathutil, |
|
36 | 36 | profiling, |
|
37 | 37 | pycompat, |
|
38 | rcutil, | |
|
38 | 39 | registrar, |
|
39 | 40 | scmutil, |
|
40 | 41 | templater, |
@@ -192,11 +193,12 b' def rawindexentries(ui, repos, req, subd' | |||
|
192 | 193 | continue |
|
193 | 194 | |
|
194 | 195 | u = ui.copy() |
|
195 | try: | |
|
196 | u.readconfig(os.path.join(path, b'.hg', b'hgrc')) | |
|
197 | except Exception as e: | |
|
198 | u.warn(_(b'error reading %s/.hg/hgrc: %s\n') % (path, e)) | |
|
199 | continue | |
|
196 | if rcutil.use_repo_hgrc(): | |
|
197 | try: | |
|
198 | u.readconfig(os.path.join(path, b'.hg', b'hgrc')) | |
|
199 | except Exception as e: | |
|
200 | u.warn(_(b'error reading %s/.hg/hgrc: %s\n') % (path, e)) | |
|
201 | continue | |
|
200 | 202 | |
|
201 | 203 | def get(section, name, default=uimod._unset): |
|
202 | 204 | return u.config(section, name, default, untrusted=True) |
@@ -281,3 +281,21 b' Test we can skip the user configuration' | |||
|
281 | 281 | $ HGRCSKIPREPO=1 hg path |
|
282 | 282 | foo = $TESTTMP/bar |
|
283 | 283 | |
|
284 | Check that hgweb respect HGRCSKIPREPO=1 | |
|
285 | ||
|
286 | $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log | |
|
287 | hg: parse error at $TESTTMP/.hg/hgrc:3: [broken | |
|
288 | [255] | |
|
289 | $ test -f hg.pid && (cat hg.pid >> $DAEMON_PIDS) | |
|
290 | [1] | |
|
291 | $ killdaemons.py | |
|
292 | $ test -f access.log && cat access.log | |
|
293 | [1] | |
|
294 | $ test -f errors.log && cat errors.log | |
|
295 | [1] | |
|
296 | ||
|
297 | $ HGRCSKIPREPO=1 hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log | |
|
298 | $ cat hg.pid >> $DAEMON_PIDS | |
|
299 | $ killdaemons.py | |
|
300 | $ cat access.log | |
|
301 | $ cat errors.log |
General Comments 0
You need to be logged in to leave comments.
Login now