1238 _(" (templates seem to have been installed incorrectly)\n")) |
1238 _(" (templates seem to have been installed incorrectly)\n")) |
1239 |
1239 |
1240 # editor |
1240 # editor |
1241 editor = ui.geteditor() |
1241 editor = ui.geteditor() |
1242 editor = util.expandpath(editor) |
1242 editor = util.expandpath(editor) |
1243 fm.write('editor', _("checking commit editor... (%s)\n"), editor) |
1243 editorbin = pycompat.shlexsplit(editor)[0] |
1244 cmdpath = util.findexe(pycompat.shlexsplit(editor)[0]) |
1244 fm.write('editor', _("checking commit editor... (%s)\n"), editorbin) |
|
1245 cmdpath = util.findexe(editorbin) |
1245 fm.condwrite(not cmdpath and editor == 'vi', 'vinotfound', |
1246 fm.condwrite(not cmdpath and editor == 'vi', 'vinotfound', |
1246 _(" No commit editor set and can't find %s in PATH\n" |
1247 _(" No commit editor set and can't find %s in PATH\n" |
1247 " (specify a commit editor in your configuration" |
1248 " (specify a commit editor in your configuration" |
1248 " file)\n"), not cmdpath and editor == 'vi' and editor) |
1249 " file)\n"), not cmdpath and editor == 'vi' and editorbin) |
1249 fm.condwrite(not cmdpath and editor != 'vi', 'editornotfound', |
1250 fm.condwrite(not cmdpath and editor != 'vi', 'editornotfound', |
1250 _(" Can't find editor '%s' in PATH\n" |
1251 _(" Can't find editor '%s' in PATH\n" |
1251 " (specify a commit editor in your configuration" |
1252 " (specify a commit editor in your configuration" |
1252 " file)\n"), not cmdpath and editor) |
1253 " file)\n"), not cmdpath and editorbin) |
1253 if not cmdpath and editor != 'vi': |
1254 if not cmdpath and editor != 'vi': |
1254 problems += 1 |
1255 problems += 1 |
1255 |
1256 |
1256 # check username |
1257 # check username |
1257 username = None |
1258 username = None |