# HG changeset patch # User Jun Wu <qu...@fb.com> # Date 1490589702 25200 # Sun Mar 26 21:41:42 2017 -0700 # Node ID cc06430c144b85ae2d53528eb8149f1debdb7706 # Parent 4ed7dd7a9241b7b792ab6c810d298a70348c9a27 # Available At https://bitbucket.org/quark-zju/hg-draft # hg pull https://bitbucket.org/quark-zju/hg-draft -r cc06430c144b 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