Issue2104

Title Converting a broken repo exits with TypeError in localrepo.py
Priority bug Status chatting
Superseder localrepo._filecommit gets None in crev
View: 2484
Nosy List mpm, richert, tonfa
Assigned To Topics

Created on 2010-03-19.08:00:07 by richert, last changed 2010-11-10.07:25:37 by mpm.

Messages
msg14345 (view) Author: mpm Date: 2010-11-10.07:25:37
Duplicate of 2484
msg14127 (view) Author: mpm Date: 2010-10-20.17:30:45
This is probably a bug in localrepo._filecommit that's been fixed since
1.3.1. Closing.
msg13896 (view) Author: tonfa Date: 2010-10-09.15:37:45
I tried to reproduce it in the following way:

$ hg init broken
$ cd broken/
$ touch a b c
$ hg ci -Am m
adding a
adding b
adding c
$ hg cp c d
$ hg ci -mm

then I tried deleting the revlog for c or d, but none of that triggered the 
bug.
msg12090 (view) Author: richert Date: 2010-03-19.08:00:07
Due to a hardi disk crash some of my .hg/ files were corrupted. "hg verify"
showed 

[...]
36 integrity errors encountered!
(first damaged changeset appears to be 19)

All errors are missing revlogs.

When I try to convert it with 

hg convert --config convert.hg.ignoreerrors=True repo-broken repo-fixed

I get:

[...]
ignoring: data/_pyenv_32/lib/python2.6/abc.py.i@22b14ed2f13b: no match
found
ignoring: data/_pyenv_32/lib/python2.6/abc.pyc.i@cd402d2c5758: no match
found
ignoring: data/_pyenv_32/lib/python2.6/codecs.py.i@448b0731c704: no match
found
ignoring: data/_pyenv_32/lib/python2.6/codecs.pyc.i@0cad8a19b459: no match
found
ignoring: data/_pyenv_32/lib/python2.6/config.i@13a77e25f412: no match
found
ignoring: data/_pyenv_32/lib/python2.6/copy_reg.py.i@9ed12e95a945: no match
found
ignoring: data/_pyenv_32/lib/python2.6/copy_reg.pyc.i@d17f8a0af7ac: no
match found
ignoring:
data/_pyenv_32/lib/python2.6/distutils/__init__.py.i@e16b386e13d8: no match
found
ignoring:
data/_pyenv_32/lib/python2.6/distutils/__init__.pyc.i@386dba9a4223: no
match found
ignoring:
data/_pyenv_32/lib/python2.6/distutils/distutils.cfg.i@c287407f37a7: no
match found
ignoring: data/_pyenv_32/lib/python2.6/encodings.i@227a84f34049: no match
found
** unknown exception encountered, details follow
** report bug details to http://mercurial.selenic.com/bts/
** or mercurial@selenic.com
** Mercurial Distributed SCM (version 1.3.1)
** Extensions loaded: color, convert, extdiff, hgk, graphlog, fetch, record
Traceback (most recent call last):
  File "/usr/bin/hg", line 27, in <module>
    mercurial.dispatch.run()
  File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 16, in
run
    sys.exit(dispatch(sys.argv[1:]))
  File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 27, in
dispatch
    return _runcatch(u, args)
  File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 43, in
_runcatch
    return _dispatch(ui, args)
  File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 449, in
_dispatch
    return runcommand(lui, repo, cmd, fullargs, ui, options, d)
  File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 317, in
runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 501, in
_runcommand
    return checkargs()
  File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 454, in
checkargs
    return cmdfunc()
  File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 448, in
<lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/usr/lib/pymodules/python2.6/mercurial/util.py", line 402, in check
    return func(*args, **kwargs)
  File "/usr/lib/pymodules/python2.6/hgext/convert/__init__.py", line 232,
in convert
    return convcmd.convert(ui, src, dest, revmapfile, **opts)
  File "/usr/lib/pymodules/python2.6/hgext/convert/convcmd.py", line 395,
in convert
    c.convert(sortmode)
  File "/usr/lib/pymodules/python2.6/hgext/convert/convcmd.py", line 329,
in convert
    self.copy(c)
  File "/usr/lib/pymodules/python2.6/hgext/convert/convcmd.py", line 301,
in copy
    self.source, self.map)
  File "/usr/lib/pymodules/python2.6/hgext/convert/hg.py", line 164, in
putcommit
    self.repo.commitctx(ctx)
  File "/usr/lib/pymodules/python2.6/mercurial/localrepo.py", line 931, in
commitctx
    changed)
  File "/usr/lib/pymodules/python2.6/mercurial/localrepo.py", line 777, in
_filecommit
    self.ui.debug(_(" %s: copy %s:%s\n") % (fname, cfname, hex(crev)))
TypeError: b2a_hex() argument 1 must be string or read-only buffer, not
None
History
Date User Action Args
2010-11-10 07:25:37mpmsetstatus: resolved -> chatting
superseder: + localrepo._filecommit gets None in crev
messages: + msg14345
nosy: mpm, tonfa, richert
2010-10-20 17:30:45mpmsetstatus: need-eg -> resolved
nosy: + mpm
messages: + msg14127
2010-10-09 15:37:45tonfasetstatus: unread -> need-eg
nosy: + tonfa
messages: + msg13896
2010-03-19 08:00:07richertcreate