[issue1220] Crash on failure in sshserver.py if permissions are bad
Scott
mercurial-bugs at selenic.com
Wed Jul 9 07:21:08 CDT 2008
New submission from Scott <scott.stafford at gmail.com>:
While attempting to "hg push" to an (apparently) poorly-configured server, I got
this error:
C:\work\tol>hg push
pushing to ssh://XXXXXXX/hgrepo/tol
searching for changes
remote: ** unknown exception encountered, details follow
remote: ** report bug details to http://www.selenic.com/mercurial/bts
remote: ** or mercurial at selenic.com
remote: ** Mercurial Distributed SCM (version 1.0.1)
remote: Traceback (most recent call last):
remote: File "/usr/local/bin/hg", line 20, in ?
remote: mercurial.dispatch.run()
remote: File "/usr/local/lib/python2.4/site-packages/mercurial/dispatch.py",
line 20, in run
remote: sys.exit(dispatch(sys.argv[1:]))
remote: File "/usr/local/lib/python2.4/site-packages/mercurial/dispatch.py",
line 29, in dispatch
remote: return _runcatch(u, args)
remote: File "/usr/local/lib/python2.4/site-packages/mercurial/dispatch.py",
line 45, in _runcatch
remote: return _dispatch(ui, args)
remote: File "/usr/local/lib/python2.4/site-packages/mercurial/dispatch.py",
line 364, in _dispatch
remote: ret = _runcommand(ui, options, cmd, d)
remote: File "/usr/local/lib/python2.4/site-packages/mercurial/dispatch.py",
line 417, in _runcommand
remote: return checkargs()
remote: File "/usr/local/lib/python2.4/site-packages/mercurial/dispatch.py",
line 373, in checkargs
remote: return cmdfunc()
remote: File "/usr/local/lib/python2.4/site-packages/mercurial/dispatch.py",
line 356, in <lambda>
remote: d = lambda: func(ui, repo, *args, **cmdoptions)
remote: File "/usr/local/lib/python2.4/site-packages/mercurial/commands.py",
line 2503, in serve
remote: s.serve_forever()
remote: File "/usr/local/lib/python2.4/site-packages/mercurial/sshserver.py",
line 40, in serve_forever
remote: while self.serve_one(): pass
remote: File "/usr/local/lib/python2.4/site-packages/mercurial/sshserver.py",
line 47, in serve_one
remote: if impl: impl()
remote: File "/usr/local/lib/python2.4/site-packages/mercurial/sshserver.py",
line 201, in do_unbundle
remote: fp.close()
remote: UnboundLocalError: local variable 'fp' referenced before assignment
abort: unexpected response: empty string
Which from code inspection points out two things: the "finally" uses vars that
may not exist yet, and my server doesn't seem to have access to a temp directory
(damn it). Anyway, it's a superficial thing that would fail, but should fail
more gracefully, maybe with an error message saying what the problem is...
----------
messages: 6493
nosy: ses4j
priority: bug
status: unread
title: Crash on failure in sshserver.py if permissions are bad
____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue1220>
____________________________________________________
More information about the Mercurial-devel
mailing list