legacyui: remove it since the Rust config parser is working fine

Summary:
The Rust config parser is working well. Therefore remove the legacy config
support.

Reviewed By: markbt

Differential Revision: D9840431

fbshipit-source-id: cebb98f74f60a1848dacf9622607249efc7d2099
This commit is contained in:
Jun Wu 2018-09-21 14:29:22 -07:00 committed by Facebook Github Bot
parent 69fa3893cb
commit d61bfcb84f
3 changed files with 0 additions and 1777 deletions

View File

@ -321,13 +321,3 @@ def shoulduselegacy(name):
return name in legacy.split()
else:
return os.path.lexists(os.path.join(configdir, "legacy.%s" % name))
# Put a file under configdir/legacy.ui to use the legacy ui module.
# This is an emergency way to switch to the old config parser if the new Rust
# parser has issues. The legacy ui module should be removed once the new Rust
# config parser is verified to work stably in production.
if shoulduselegacy("ui"):
import mercurial.legacyui as ui
sys.modules["mercurial.ui"] = ui

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +0,0 @@
$ HGLEGACY= hg debugshell -c 'print(type(ui)); print(m.ui); print(__import__("mercurial.ui").ui)'
<class 'mercurial.ui.ui'>
<module 'mercurial.ui' from '*'> (glob)
<module 'mercurial.ui' from '*'> (glob)
$ HGLEGACY=ui hg debugshell -c 'print(type(ui)); print(m.ui); print(__import__("mercurial.ui").ui)'
<class 'mercurial.legacyui.ui'>
<module 'mercurial.legacyui' from '*'> (glob)
<module 'mercurial.legacyui' from '*'> (glob)