Mercurial > hg
view tests/test-absorb-phase.t @ 39690:e0c5017124b3
localrepo: load extensions in makelocalrepository()
Behavior does change subtly.
First, we now load the hgrc before optionally setting up the vfs ward.
That's fine: the vfs ward is for debugging and we know we won't hit it
when reading .hg/hgrc. If the loaded extension were performing repo/vfs
I/O, then we'd be worried. But extensions don't have access to the
repo object that loaded them when they are loaded. Unless they are
doing stack walking as part of module loading (which would be crazy),
they shouldn't have access to the repo that incurred their load.
Second, we now load extensions outside of the try..except IOError
block. Previously, if loading an extension raised IOError, it would
be silently ignored. I'm pretty sure the IOError is there for missing
.hgrc files and should never have been ignored for issues loading
extensions. I don't think this matters in reality because extension
loading traps I/O errors.
Differential Revision: https://phab.mercurial-scm.org/D4566
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Wed, 12 Sep 2018 11:44:57 -0700 |
parents | 0b7594ada0db |
children | 31dfa7dac4c9 |
line wrap: on
line source
$ cat >> $HGRCPATH << EOF > [extensions] > absorb= > drawdag=$TESTDIR/drawdag.py > EOF $ hg init $ hg debugdrawdag <<'EOS' > C > | > B > | > A > EOS $ hg phase -r A --public -q $ hg phase -r C --secret --force -q $ hg update C -q $ printf B1 > B $ hg absorb -q $ hg log -G -T '{desc} {phase}' @ C secret | o B draft | o A public