# HG changeset patch # User Jun Wu <qu...@fb.com> # Date 1490589702 25200 # Sun Mar 26 21:41:42 2017 -0700 # Node ID a354f13a30b93943635224fcd90f43019241e23e # Parent 0c745bb07fd82bb9383698c60c042101ee45f4ab # Available At https://bitbucket.org/quark-zju/hg-draft # hg pull https://bitbucket.org/quark-zju/hg-draft -r a354f13a30b9 ui: simplify geteditor
Now $EDITOR and $VISUAL will affect ui.editor directly. So it's no longer necessary to test them in ui.geteditor. diff --git a/mercurial/ui.py b/mercurial/ui.py --- a/mercurial/ui.py +++ b/mercurial/ui.py @@ -1327,7 +1327,5 @@ class ui(object): editor = 'vi' return (encoding.environ.get("HGEDITOR") or - self.config("ui", "editor") or - encoding.environ.get("VISUAL") or - encoding.environ.get("EDITOR", editor)) + self.config("ui", "editor", editor)) @util.propertycache _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel