mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 16:57:49 +03:00
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:
parent
69fa3893cb
commit
d61bfcb84f
@ -321,13 +321,3 @@ def shoulduselegacy(name):
|
|||||||
return name in legacy.split()
|
return name in legacy.split()
|
||||||
else:
|
else:
|
||||||
return os.path.lexists(os.path.join(configdir, "legacy.%s" % name))
|
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
@ -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)
|
|
Loading…
Reference in New Issue
Block a user