comparison mercurial/commands.py @ 24891:be4915009b09 stable

debuginstall: expand the editor path before searching for it (issue4380) The editor launches without expanding the path with commits because the shell does that for us. If the path isn't an executable, the expanded path is displayed, which is probably more useful than the unexpanded path. For example, in cmd.exe, '~' expands to C:\Users\$user. But it expands to C:/mingw/msys/1.0/home/$user in MinGW.
author Matt Harbison <matt_harbison@yahoo.com>
date Thu, 30 Apr 2015 23:02:52 -0400
parents 12908cdbab73
children a4ee6f774f14
comparison
equal deleted inserted replaced
24890:cba84b06b702 24891:be4915009b09
2368 problems += 1 2368 problems += 1
2369 2369
2370 # editor 2370 # editor
2371 ui.status(_("checking commit editor...\n")) 2371 ui.status(_("checking commit editor...\n"))
2372 editor = ui.geteditor() 2372 editor = ui.geteditor()
2373 editor = util.expandpath(editor)
2373 cmdpath = util.findexe(shlex.split(editor)[0]) 2374 cmdpath = util.findexe(shlex.split(editor)[0])
2374 if not cmdpath: 2375 if not cmdpath:
2375 if editor == 'vi': 2376 if editor == 'vi':
2376 ui.write(_(" No commit editor set and can't find vi in PATH\n")) 2377 ui.write(_(" No commit editor set and can't find vi in PATH\n"))
2377 ui.write(_(" (specify a commit editor in your configuration" 2378 ui.write(_(" (specify a commit editor in your configuration"