mercurial/ui.py
changeset 7496 0a27d0db256d
parent 7320 8dca507e56ce
child 7497 f598df061fec
equal deleted inserted replaced
7494:85dc88630beb 7496:0a27d0db256d
   405                 # magically add command line editing support, where
   405                 # magically add command line editing support, where
   406                 # available
   406                 # available
   407                 import readline
   407                 import readline
   408                 # force demandimport to really load the module
   408                 # force demandimport to really load the module
   409                 readline.read_history_file
   409                 readline.read_history_file
   410             except ImportError:
   410                 # windows sometimes raises something other than ImportError
       
   411             except Exception:
   411                 pass
   412                 pass
   412         line = raw_input(prompt)
   413         line = raw_input(prompt)
   413         # When stdin is in binary mode on Windows, it can cause
   414         # When stdin is in binary mode on Windows, it can cause
   414         # raw_input() to emit an extra trailing carriage return
   415         # raw_input() to emit an extra trailing carriage return
   415         if os.linesep == '\r\n' and line and line[-1] == '\r':
   416         if os.linesep == '\r\n' and line and line[-1] == '\r':