mercurial/commands.py
changeset 30678 caf7e1c5efe4
parent 30669 10b17ed9b591
child 30714 8d46eaaa589c
equal deleted inserted replaced
30677:c80c16a8a0b0 30678:caf7e1c5efe4
     9 
     9 
    10 import difflib
    10 import difflib
    11 import errno
    11 import errno
    12 import os
    12 import os
    13 import re
    13 import re
    14 import shlex
       
    15 import socket
    14 import socket
    16 import string
    15 import string
    17 import sys
    16 import sys
    18 import tempfile
    17 import tempfile
    19 import time
    18 import time
  1979 
  1978 
  1980     # editor
  1979     # editor
  1981     editor = ui.geteditor()
  1980     editor = ui.geteditor()
  1982     editor = util.expandpath(editor)
  1981     editor = util.expandpath(editor)
  1983     fm.write('editor', _("checking commit editor... (%s)\n"), editor)
  1982     fm.write('editor', _("checking commit editor... (%s)\n"), editor)
  1984     cmdpath = util.findexe(shlex.split(editor)[0])
  1983     cmdpath = util.findexe(pycompat.shlexsplit(editor)[0])
  1985     fm.condwrite(not cmdpath and editor == 'vi', 'vinotfound',
  1984     fm.condwrite(not cmdpath and editor == 'vi', 'vinotfound',
  1986                  _(" No commit editor set and can't find %s in PATH\n"
  1985                  _(" No commit editor set and can't find %s in PATH\n"
  1987                    " (specify a commit editor in your configuration"
  1986                    " (specify a commit editor in your configuration"
  1988                    " file)\n"), not cmdpath and editor == 'vi' and editor)
  1987                    " file)\n"), not cmdpath and editor == 'vi' and editor)
  1989     fm.condwrite(not cmdpath and editor != 'vi', 'editornotfound',
  1988     fm.condwrite(not cmdpath and editor != 'vi', 'editornotfound',