[issue1581] convert: syntax errors in splicemap reported late and poorly
Greg Ward
mercurial-bugs at selenic.com
Mon Mar 30 16:31:27 CDT 2009
New submission from Greg Ward <greg-hg at gerg.ca>:
Passing an invalid splicemap or authormap file to "hg convert" results in a
stack trace, rather than a friendly error message. Example:
$ cat splicemap
# make "[3925] merge with trunk and rebranch"
# a merge of trunk onto kill-DBF-branch
3012 = 3009 3011
$ hg convert --splicemap=splicemap proj.cvs proj.hg
[...read entire cvs repo...]
13822 changeset entries
connecting to <cvsrepo>
** unknown exception encountered, details follow
** report bug details to http://www.selenic.com/mercurial/bts
** or mercurial at selenic.com
** Mercurial Distributed SCM (version 1.2.1)
** Extensions loaded: convert, graphlog, hgk, mq, patchbomb, purge, rebase,
record, transplant
Traceback (most recent call last):
File "/home/gward/bin/hg", line 27, in ?
mercurial.dispatch.run()
File "/home/scratch/src/hg-stable-issue1558/mercurial/dispatch.py", line 16,
in run
sys.exit(dispatch(sys.argv[1:]))
File "/home/scratch/src/hg-stable-issue1558/mercurial/dispatch.py", line 25,
in dispatch
return _runcatch(u, args)
File "/home/scratch/src/hg-stable-issue1558/mercurial/dispatch.py", line 41,
in _runcatch
return _dispatch(ui, args)
File "/home/scratch/src/hg-stable-issue1558/mercurial/dispatch.py", line 372,
in _dispatch
return runcommand(lui, repo, cmd, fullargs, ui, options, d)
File "/home/scratch/src/hg-stable-issue1558/mercurial/dispatch.py", line 247,
in runcommand
ret = _runcommand(ui, options, cmd, d)
File "/home/scratch/src/hg-stable-issue1558/mercurial/dispatch.py", line 417,
in _runcommand
return checkargs()
File "/home/scratch/src/hg-stable-issue1558/mercurial/dispatch.py", line 377,
in checkargs
return cmdfunc()
File "/home/scratch/src/hg-stable-issue1558/mercurial/dispatch.py", line 371,
in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
File "/home/scratch/src/hg-stable-issue1558/mercurial/util.py", line 718, in check
return func(*args, **kwargs)
File "hgext/convert/__init__.py", line 199, in convert
File "/home/scratch/src/hg-stable-issue1558/hgext/convert/convcmd.py", line
340, in convert
c = converter(ui, srcc, destc, revmapfile, opts)
File "/home/scratch/src/hg-stable-issue1558/hgext/convert/convcmd.py", line
93, in __init__
self.splicemap = mapfile(ui, opts.get('splicemap'))
File "hgext/convert/common.py", line 325, in __init__
File "hgext/convert/common.py", line 337, in _read
ValueError: need more than 1 value to unpack
Two problems here:
* hg doesn't attempt to parse the splicemap until after it has read
through my entire CVS repository, meaning I don't find out about
the syntax error for several minutes
* it's not reported as a syntax error -- hg just crashes
----------
messages: 8936
nosy: gward
priority: bug
status: unread
title: convert: syntax errors in splicemap reported late and poorly
topic: convert
____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue1581>
____________________________________________________
More information about the Mercurial-devel
mailing list