[Bug 3569] New: Color extesnsion got exception when hg called with python's subprocess.Popen

bugzilla-daemon at bz.selenic.com bugzilla-daemon at bz.selenic.com
Thu Aug 2 01:48:38 CDT 2012


http://bz.selenic.com/show_bug.cgi?id=3569

          Priority: normal
            Bug ID: 3569
                CC: mercurial-devel at selenic.com
          Assignee: bugzilla at selenic.com
           Summary: Color extesnsion got exception when hg called with
                    python's subprocess.Popen
          Severity: bug
    Classification: Unclassified
                OS: Linux
          Reporter: kabakov.as at gmail.com
          Hardware: PC
            Status: UNCONFIRMED
           Version: unspecified
         Component: color
           Product: Mercurial

args = ['hg', 'log', '-u', 'username', '-R', 'repopath']
proc = subprocess.Popen(args, stdout=subprocess.PIPE)
for line in proc.stdout:
    print line


hgrc
-------
[extensions]
color =

[color]
status.modified = magenta
status.added = green
status.removed = red
status.deleted = cyan
status.unknown = blue
status.ignored = black


** unknown exception encountered, please report by visiting
**  http://mercurial.selenic.com/wiki/BugTracker
** Python 2.7.3 (default, Apr 20 2012, 22:44:07) [GCC 4.6.3]
** Mercurial Distributed SCM (version 2.0.2)
** Extensions loaded: color
Traceback (most recent call last):
  File "/usr/bin/hg", line 38, in <module>
    mercurial.dispatch.run()
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 27, in
run
    sys.exit(dispatch(request(sys.argv[1:])))
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 64, in
dispatch
    return _runcatch(req)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 87, in
_runcatch
    return _dispatch(req)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 684, in
_dispatch
    cmdpats, cmdoptions)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 466, in
runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/lib/python2.7/dist-packages/mercurial/extensions.py", line 184, in
wrap
    return wrapper(origfn, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/hgext/color.py", line 365, in colorcmd
    mode = _modesetup(ui_, opts)
  File "/usr/lib/python2.7/dist-packages/hgext/color.py", line 168, in
_modesetup
    coloropt = opts['color']
KeyError: 'color'

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list