mercurial/commands.py
changeset 3775 a88e02081a88
parent 3774 b1eeaeb936ae
child 3787 8d603f8567ae
equal deleted inserted replaced
3774:b1eeaeb936ae 3775:a88e02081a88
  2313     ('q', 'quiet', None, _('suppress output')),
  2313     ('q', 'quiet', None, _('suppress output')),
  2314     ('v', 'verbose', None, _('enable additional output')),
  2314     ('v', 'verbose', None, _('enable additional output')),
  2315     ('', 'config', [], _('set/override config option')),
  2315     ('', 'config', [], _('set/override config option')),
  2316     ('', 'debug', None, _('enable debugging output')),
  2316     ('', 'debug', None, _('enable debugging output')),
  2317     ('', 'debugger', None, _('start debugger')),
  2317     ('', 'debugger', None, _('start debugger')),
       
  2318     ('', 'encoding', util._encoding, _('set the charset encoding')),
       
  2319     ('', 'encodingmode', util._encodingmode, _('set the charset encoding mode')),
  2318     ('', 'lsprof', None, _('print improved command execution profile')),
  2320     ('', 'lsprof', None, _('print improved command execution profile')),
  2319     ('', 'traceback', None, _('print traceback on exception')),
  2321     ('', 'traceback', None, _('print traceback on exception')),
  2320     ('', 'time', None, _('time how long the command takes')),
  2322     ('', 'time', None, _('time how long the command takes')),
  2321     ('', 'profile', None, _('print command execution profile')),
  2323     ('', 'profile', None, _('print command execution profile')),
  2322     ('', 'version', None, _('output version information and exit')),
  2324     ('', 'version', None, _('output version information and exit')),
  2865     load_extensions(u)
  2867     load_extensions(u)
  2866     u.addreadhook(load_extensions)
  2868     u.addreadhook(load_extensions)
  2867 
  2869 
  2868     try:
  2870     try:
  2869         cmd, func, args, options, cmdoptions = parse(u, args)
  2871         cmd, func, args, options, cmdoptions = parse(u, args)
       
  2872         if options["encoding"]:
       
  2873             util._encoding = options["encoding"]
       
  2874         if options["encodingmode"]:
       
  2875             util._encodingmode = options["encodingmode"]
  2870         if options["time"]:
  2876         if options["time"]:
  2871             def get_times():
  2877             def get_times():
  2872                 t = os.times()
  2878                 t = os.times()
  2873                 if t[4] == 0.0: # Windows leaves this as zero, so use time.clock()
  2879                 if t[4] == 0.0: # Windows leaves this as zero, so use time.clock()
  2874                     t = (t[0], t[1], t[2], t[3], time.clock())
  2880                     t = (t[0], t[1], t[2], t[3], time.clock())