[issue2898] too long a path emits a stack trace
Danek Duvall
bugs at mercurial.selenic.com
Tue Jul 12 19:56:19 UTC 2011
New submission from Danek Duvall <danek.duvall at sun.com>:
A co-worker got the following stack trace when running "hg merge":
** unknown exception encountered, please report by visiting
** http://mercurial.selenic.com/wiki/BugTracker
** Python 2.6.4 (r264:75706, May 28 2011, 03:27:39) [C]
** Mercurial Distributed SCM (version 1.8.2)
** Extensions loaded:
Traceback (most recent call last):
File "/bin/hg", line 38, in <module>
mercurial.dispatch.run()
File "/usr/lib/python2.6/vendor-packages/mercurial/dispatch.py", line 16,
in run
sys.exit(dispatch(sys.argv[1:]))
File "/usr/lib/python2.6/vendor-packages/mercurial/dispatch.py", line 36,
in dispatch
return _runcatch(u, args)
File "/usr/lib/python2.6/vendor-packages/mercurial/dispatch.py", line 58,
in _runcatch
return _dispatch(ui, args)
File "/usr/lib/python2.6/vendor-packages/mercurial/dispatch.py", line 601,
in _dispatch
cmdpats, cmdoptions)
File "/usr/lib/python2.6/vendor-packages/mercurial/dispatch.py", line 406,
in runcommand
ret = _runcommand(ui, options, cmd, d)
File "/usr/lib/python2.6/vendor-packages/mercurial/dispatch.py", line 655,
in _runcommand
return checkargs()
File "/usr/lib/python2.6/vendor-packages/mercurial/dispatch.py", line 609,
in checkargs
return cmdfunc()
File "/usr/lib/python2.6/vendor-packages/mercurial/dispatch.py", line 598,
in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
File "/usr/lib/python2.6/vendor-packages/mercurial/util.py", line 433, in
check
return func(*args, **kwargs)
File "/usr/lib/python2.6/vendor-packages/mercurial/commands.py", line
2780, in merge
return hg.merge(repo, node, force=opts.get('force'))
File "/usr/lib/python2.6/vendor-packages/mercurial/hg.py", line 400, in merge
stats = mergemod.update(repo, node, True, force, False)
File "/usr/lib/python2.6/vendor-packages/mercurial/merge.py", line 535, in
update
wc.status(unknown=True) # prime cache
File "/usr/lib/python2.6/vendor-packages/mercurial/context.py", line 680,
in status
stat = self._repo.status(ignored=ignored, clean=clean, unknown=unknown)
File "/usr/lib/python2.6/vendor-packages/mercurial/localrepo.py", line
1173, in status
listclean, listunknown)
File "/usr/lib/python2.6/vendor-packages/mercurial/dirstate.py", line 665,
in status
listignored).iteritems():
File "/usr/lib/python2.6/vendor-packages/mercurial/dirstate.py", line 585,
in walk
entries = listdir(join(nd), stat=True, skip=skip)
ValueError: path too long
When I asked him to modify walk() to print out the path it was choking on,
it turned out to be as I expected -- a path longer than PATH_MAX. It looks
like some program went wild and created a deep directory hierarchy that it
shouldn't have. I expect the problem will go away when he removes that
directory.
Still, mercurial shouldn't blow up in this situation. If it can't actually
do anything beyond PATH_MAX, then something higher up should catch the
error, and exit with a message explaining what the problem is, as well as
mentioning the problematic path.
----------
messages: 16806
nosy: dduvall
priority: bug
status: unread
title: too long a path emits a stack trace
____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue2898>
____________________________________________________
More information about the Mercurial-devel
mailing list