subrepo: add config option to reject any subrepo operations (SEC)
This is an alternative workaround for the issue5730. Perhaps this is the simplest way of disabling subrepo operations. It does nothing clever, but just aborts if Mercurial starts accessing to a subrepo. I think Greg's patch is more useful since it allows us to at least check out the parent repository. However, that would be confusing if the default is flipped to checkout=False and subrepos are silently ignored. I don't like the config name 'allowed', but I couldn't get any better name.
Showing
- mercurial/configitems.py 3 additions, 0 deletionsmercurial/configitems.py
- mercurial/help/config.txt 13 additions, 0 deletionsmercurial/help/config.txt
- mercurial/subrepo.py 13 additions, 6 deletionsmercurial/subrepo.py
- tests/test-subrepo-git.t 20 additions, 0 deletionstests/test-subrepo-git.t
- tests/test-subrepo.t 20 additions, 0 deletionstests/test-subrepo.t
Please register or sign in to comment