[issue2907] cmdserver: crash with incoming --bundle

Martin Geisler bugs at mercurial.selenic.com
Mon Jul 18 08:44:28 CDT 2011


New submission from Martin Geisler <mg at lazybytes.net>:

We have run into a crash when implementing JavaHg: running 'hg incoming
--bundle' gives the traceback below:

** unknown exception encountered, please report by visiting
**  http://mercurial.selenic.com/wiki/BugTracker
** Python 2.6.6 (r266:84292, Apr 20 2011, 09:34:38) [GCC 4.5.2]
** Mercurial Distributed SCM (version 1.9)
** Extensions loaded: 
return s.serve()
  File "/home/mg/src/mercurial-crew/mercurial/commandserver.py", line 222,
in serve
    while self.serveone():
  File "/home/mg/src/mercurial-crew/mercurial/commandserver.py", line 202,
in serveone
    handler(self)
  File "/home/mg/src/mercurial-crew/mercurial/commandserver.py", line 189,
in runcommand
    ret = dispatch.dispatch(req) or 0 # might return None
  File "/home/mg/src/mercurial-crew/mercurial/dispatch.py", line 64, in dispatch
    return _runcatch(req)
  File "/home/mg/src/mercurial-crew/mercurial/dispatch.py", line 87, in
_runcatch
    return _dispatch(req)
  File "/home/mg/src/mercurial-crew/mercurial/dispatch.py", line 675, in
_dispatch
    cmdpats, cmdoptions)
  File "/home/mg/src/mercurial-crew/mercurial/dispatch.py", line 454, in
runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/home/mg/src/mercurial-crew/mercurial/dispatch.py", line 729, in
_runcommand
    return checkargs()
  File "/home/mg/src/mercurial-crew/mercurial/dispatch.py", line 683, in
checkargs
    return cmdfunc()
  File "/home/mg/src/mercurial-crew/mercurial/dispatch.py", line 672, in
<lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/home/mg/src/mercurial-crew/mercurial/util.py", line 385, in check
    return func(*args, **kwargs)
  File "/home/mg/src/mercurial-crew/mercurial/commands.py", line 3264, in
incoming
    return hg.incoming(ui, repo, source, opts)
  File "/home/mg/src/mercurial-crew/mercurial/hg.py", line 480, in incoming
    return _incoming(display, subreporecurse, ui, repo, source, opts)
  File "/home/mg/src/mercurial-crew/mercurial/hg.py", line 439, in _incoming
    revs, opts["bundle"], opts["force"])
  File "/home/mg/src/mercurial-crew/mercurial/bundlerepo.py", line 338, in
getremotechanges
    fname = bundle = changegroup.writebundle(cg, bundlename, bundletype)
  File "/home/mg/src/mercurial-crew/mercurial/changegroup.py", line 95, in
writebundle
    chunk = getchunk(cg)
  File "/home/mg/src/mercurial-crew/mercurial/changegroup.py", line 26, in
getchunk
    d = readexactly(stream, 4)
  File "/home/mg/src/mercurial-crew/mercurial/changegroup.py", line 17, in
readexactly
    s = stream.read(n)
AttributeError: 'NoneType' object has no attribute 'read'


I reproduced it with the attached Python-based cmdserver client.

----------
assignedto: idank
files: hg-cmdserver-incoming.py
messages: 16866
nosy: idank, mg
priority: bug
status: unread
title: cmdserver: crash with incoming --bundle

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue2907>
____________________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hg-cmdserver-incoming.py
Type: text/x-python
Size: 2060 bytes
Desc: not available
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20110718/833baf72/attachment.py>


More information about the Mercurial-devel mailing list