[issue1285] hg glog Mercurial crash

Guido Ostkamp mercurial-bugs at selenic.com
Mon Sep 1 16:35:34 CDT 2008


New submission from Guido Ostkamp <hg at ostkamp.fastmail.fm>:

hg glog crashes Mercurial, if executed outside of repo. This might be no
standard usecase, but still Mercurial should not crash.

Tested with Crew repo, version a04d8cadb6af.

hg init repo
cd repo
echo "line" > file
hg add file
hg commit -m "initial checkin"
cd ..
hg glog repo
** unknown exception encountered, details follow
** report bug details to http://www.selenic.com/mercurial/bts
** or mercurial at selenic.com
** Mercurial Distributed SCM (version a04d8cadb6af)
Traceback (most recent call last):
  File "/usr/local/bin/hg", line 20, in <module>
    mercurial.dispatch.run()
  File "/usr/local/lib/python2.5/site-packages/mercurial/dispatch.py", line 20,
in run
    sys.exit(dispatch(sys.argv[1:]))
  File "/usr/local/lib/python2.5/site-packages/mercurial/dispatch.py", line 29,
in dispatch
    return _runcatch(u, args)
  File "/usr/local/lib/python2.5/site-packages/mercurial/dispatch.py", line 45,
in _runcatch
    return _dispatch(ui, args)
  File "/usr/local/lib/python2.5/site-packages/mercurial/dispatch.py", line 351,
in _dispatch
    return _dispatch(ui, ['--repository', guess] + fullargs)
  File "/usr/local/lib/python2.5/site-packages/mercurial/dispatch.py", line 364,
in _dispatch
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/local/lib/python2.5/site-packages/mercurial/dispatch.py", line 417,
in _runcommand
    return checkargs()
  File "/usr/local/lib/python2.5/site-packages/mercurial/dispatch.py", line 373,
in checkargs
    return cmdfunc()
  File "/usr/local/lib/python2.5/site-packages/mercurial/dispatch.py", line 356,
in <lambda>
    d = lambda: func(ui, repo, *args, **cmdoptions)
  File "/usr/local/lib/python2.5/site-packages/hgext/graphlog.py", line 227, in
graphlog
    for (rev, node, node_index, edges, n_columns, n_columns_diff) in grapher:
  File "/usr/local/lib/python2.5/site-packages/hgext/graphlog.py", line 92, in
filelog_grapher
    filerev = len(repo.file(path)) - 1
  File "/usr/local/lib/python2.5/site-packages/mercurial/localrepo.py", line
472, in file
    if f[0] == '/':
IndexError: string index out of range

----------
messages: 6906
nosy: ostkamp
priority: bug
status: unread
title: hg glog Mercurial crash

____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue1285>
____________________________________________________



More information about the Mercurial-devel mailing list