KeyError exceptions importing from CVS
Frank Kingswood
frank at kingswood-consulting.co.uk
Fri Feb 8 17:36:47 UTC 2008
Hallo!
I'm getting KeyError exceptions importing from CVS:
** unknown exception encountered, details follow
** report bug details to http://www.selenic.com/mercurial/bts
** or mercurial at selenic.com
** Mercurial Distributed SCM (version 6605a03cbf87)
Traceback (most recent call last):
File "/home/fk/bin/hg", line 14, in <module>
mercurial.dispatch.run()
File "..lib/python/mercurial/dispatch.py", line 20, in run
sys.exit(dispatch(sys.argv[1:]))
File "..lib/python/mercurial/dispatch.py", line 29, in dispatch
return _runcatch(u, args)
File "..lib/python/mercurial/dispatch.py", line 45, in _runcatch
return _dispatch(ui, args)
File "..lib/python/mercurial/dispatch.py", line 348, in _dispatch
ret = _runcommand(ui, options, cmd, d)
File "..lib/python/mercurial/dispatch.py", line 401, in _runcommand
return checkargs()
File "..lib/python/mercurial/dispatch.py", line 357, in checkargs
return cmdfunc()
File "..lib/python/mercurial/dispatch.py", line 342, in <lambda>
d = lambda: func(ui, *args, **cmdoptions)
File "..lib/python/hgext/convert/__init__.py", line 67, in convert
return convcmd.convert(ui, src, dest, revmapfile, **opts)
File "..lib/python/hgext/convert/convcmd.py", line 311, in convert
opts.get('rev'))
File "..lib/python/hgext/convert/convcmd.py", line 37, in convertsource
return source(ui, path, rev)
File "..lib/python/hgext/convert/cvs.py", line 25, in __init__
self._parse()
File "..lib/python/hgext/convert/cvs.py", line 105, in _parse
latest = max(filerevids[r], latest)
Looking at the source of cvs.py here
http://hg.intevation.org/mercurial/crew-stable/file/6605a03cbf87/hgext/convert/cvs.py
the code does:
104 for r in oldrevs:
105 latest = max(filerevids[r], latest)
but the filerevids dictionary was initialized with keys that do not
match those in oldrevs (notice oldrev vs rev in the strings):
120 # save some information for identifying branch points
121 oldrevs.append("%s:%s" % (oldrev, file))
122 filerevids["%s:%s" % (rev, file)] = id
This is with current crew-stable.
Is this a bug?
Frank
More information about the Mercurial-devel
mailing list