Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/ui.py @ 44663:e147748f750b
merge with stable
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Thu, 02 Apr 2020 21:58:10 +0530 |
parents | b746a22349f9 c23877cb25a5 |
children | 484e04dc7f42 |
comparison
equal
deleted
inserted
replaced
44662:649fd6c3ed33 | 44663:e147748f750b |
---|---|
1912 if pycompat.sysplatform == b'plan9': | 1912 if pycompat.sysplatform == b'plan9': |
1913 # vi is the MIPS instruction simulator on Plan 9. We | 1913 # vi is the MIPS instruction simulator on Plan 9. We |
1914 # instead default to E to plumb commit messages to | 1914 # instead default to E to plumb commit messages to |
1915 # avoid confusion. | 1915 # avoid confusion. |
1916 editor = b'E' | 1916 editor = b'E' |
1917 elif pycompat.isdarwin: | |
1918 # vi on darwin is POSIX compatible to a fault, and that includes | |
1919 # exiting non-zero if you make any mistake when running an ex | |
1920 # command. Proof: `vi -c ':unknown' -c ':qa'; echo $?` produces 1, | |
1921 # while s/vi/vim/ doesn't. | |
1922 editor = b'vim' | |
1917 else: | 1923 else: |
1918 editor = b'vi' | 1924 editor = b'vi' |
1919 return encoding.environ.get(b"HGEDITOR") or self.config( | 1925 return encoding.environ.get(b"HGEDITOR") or self.config( |
1920 b"ui", b"editor", editor | 1926 b"ui", b"editor", editor |
1921 ) | 1927 ) |