[issue604] hg add: Bug with long file list

serrano mercurial-bugs at selenic.com
Wed Jun 27 02:50:31 CDT 2007


New submission from serrano <Manuel.Serrano at inria.fr>:

The version 0.9.4 seems to have introduced a bug in the HG ADD command. There
seems to be limit in the number of the arguments sent to ADD. On my machine 
(a Linux 2.6.20 with unlimited stack size), the limit seems to be around 1050
files. More precisely, when I invoke:
  hg add file1 ... file1052

everything is fine. On the other hand, when I try:
  hg add file1 ... file1052 file1053
it results in a crash:

$ hg add `cat BAR`
** unknown exception encountered, details follow
** report bug details to http://www.selenic.com/mercurial/bts
** or mercurial at selenic.com
** Mercurial Distributed SCM (version 0.9.4)
Traceback (most recent call last):
  File "/usr/bin/hg", line 11, in <module>
    mercurial.commands.run()
  File "/usr/lib/python2.5/site-packages/mercurial/commands.py", line 3110, in run
    sys.exit(dispatch(sys.argv[1:], argv0=sys.argv[0]))
  File "/usr/lib/python2.5/site-packages/mercurial/commands.py", line 3107, in
dispatch
    return cmdutil.runcatch(u, args, argv0=argv0)
  File "/usr/lib/python2.5/site-packages/mercurial/cmdutil.py", line 37, in runcatch
    return dispatch(ui, args, argv0=argv0)
  File "/usr/lib/python2.5/site-packages/mercurial/cmdutil.py", line 364, in
dispatch
    ret = runcommand(ui, options, cmd, d)
  File "/usr/lib/python2.5/site-packages/mercurial/cmdutil.py", line 417, in
runcommand
    return checkargs()
  File "/usr/lib/python2.5/site-packages/mercurial/cmdutil.py", line 373, in
checkargs
    return cmdfunc()
  File "/usr/lib/python2.5/site-packages/mercurial/cmdutil.py", line 356, in
<lambda>
    d = lambda: func(ui, repo, *args, **cmdoptions)
  File "/usr/lib/python2.5/site-packages/mercurial/commands.py", line 31, in add
    for src, abs, rel, exact in cmdutil.walk(repo, pats, opts):
  File "/usr/lib/python2.5/site-packages/mercurial/cmdutil.py", line 582, in walk
    default=default)
  File "/usr/lib/python2.5/site-packages/mercurial/cmdutil.py", line 577, in
matchpats
    default=default)
  File "/usr/lib/python2.5/site-packages/mercurial/util.py", line 413, in cmdmatcher
    return _matcher(canonroot, cwd, names, inc, exc, default, src)
  File "/usr/lib/python2.5/site-packages/mercurial/util.py", line 525, in _matcher
    patmatch = matchfn(pats, '$') or always
  File "/usr/lib/python2.5/site-packages/mercurial/util.py", line 478, in matchfn
    return re.compile(pat).match
  File "/usr/lib/python2.5/re.py", line 180, in compile
    return _compile(pattern, flags)
  File "/usr/lib/python2.5/re.py", line 231, in _compile
    p = sre_compile.compile(pattern, flags)
  File "/usr/lib/python2.5/sre_compile.py", line 530, in compile
    groupindex, indexgroup
OverflowError: regular expression code size limit exceeded

----------
files: BUG
messages: 3363
nosy: serrano
priority: urgent
status: unread
title: hg add: Bug with long file list

____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue604>
____________________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BUG
Type: application/octet-stream
Size: 2320 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial-devel/attachments/20070627/d61f2966/attachment.obj 


More information about the Mercurial-devel mailing list