Bug 787 - convert cvs source stopped working in 0.9.5 (edit)
:
:
Status: RESOLVED FIXED
:
:
:
Assigned To:
Bugzilla (edit) (take)

(edit)
:
Depends on: (edit)
Blocks: (edit)
  Show dependency treegraph
 
Reported: 2007-10-23 12:43 EDT by Ulrich Pfeifer
Modified: 2012-05-13 05:00 EDT (History)
2 users (show)

(add)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Pfeifer 2007-10-23 12:43:06 EDT
When switching from 0.9.4 to 0.9.5, the conversion of my CVS repositories break
here:

** unknown exception encountered, details follow
** report bug details to http://www.selenic.com/mercurial/bts
** or mercurial@selenic.com
** Mercurial Distributed SCM (version 0.9.5)
Traceback (most recent call last):
  File "/usr/bin/hg", line 14, in ?
    mercurial.dispatch.run()
  File "/usr/lib/python2.4/site-packages/mercurial/dispatch.py", line 20, in run
    sys.exit(dispatch(sys.argv[1:]))
  File "/usr/lib/python2.4/site-packages/mercurial/dispatch.py", line 29, in
dispatch
    return _runcatch(u, args)
  File "/usr/lib/python2.4/site-packages/mercurial/dispatch.py", line 45, in
_runcatch
    return _dispatch(ui, args)
  File "/usr/lib/python2.4/site-packages/mercurial/dispatch.py", line 348, in
_dispatch
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/lib/python2.4/site-packages/mercurial/dispatch.py", line 401, in
_runcommand
    return checkargs()
  File "/usr/lib/python2.4/site-packages/mercurial/dispatch.py", line 357, in
checkargs
    return cmdfunc()
  File "/usr/lib/python2.4/site-packages/mercurial/dispatch.py", line 342, in
<lambda>
    d = lambda: func(ui, *args, **cmdoptions)
  File "/usr/lib/python2.4/site-packages/hgext/convert/__init__.py", line 362,
in convert
    opts.get('rev'))
  File "/usr/lib/python2.4/site-packages/hgext/convert/__init__.py", line 38, in
convertsource
    return source(ui, path, rev)
  File "/usr/lib/python2.4/site-packages/hgext/convert/cvs.py", line 25, in __init__
    self._parse()
  File "/usr/lib/python2.4/site-packages/hgext/convert/cvs.py", line 103, in _parse
    rev = rev.split("->")[1]
IndexError: list index out of range

When doing some printf debugging, I see that it dies chewing on a mangeled line.
removing this line:

cvs.py:46       cmd += " 2>&1"

does seem to cure the problem.

Please let me know if you need more evidence.

Ulrich
Comment 1 Patrick Mézard 2007-10-23 13:58:31 EDT
Could you provide the problematic line ?

The redirection was necessary for cygwin cvsps and I would like to make the
parser more resilient rather than reverting this behaviour.
Comment 2 Ulrich Pfeifer 2007-10-24 05:04:09 EDT
This statement
   self.ui.status("parsing(%s,%s,%s)" % (file, rev, colon)
before the
   rev = rev.split("->")[1]

was printing these lines before barfing:
  parsing(src/net/xx/sdbadmin/search/Makefile,1.4->1.5,36)
  parsing(lib/WEB-INF/jsp/search/searchMini.jsp,1.3->1.4,38)
  parsing(src/net/xx/PatchSet 2136 ,	src/net/xx/PatchSet 2136,-1)

I am not sure how the "PatchSet ..." ended up there.  Removing the STDERR
redirection cured the problem.

Ulrich
Comment 3 Patrick Mézard 2007-11-01 05:41:57 EDT
Should be fixed by 003d1f174fe1 in crew and crew-stable.
My cygwin issue was actually a Windows python bug.

Thanks for the report !
Comment 4 Bugzilla 2012-05-12 08:44:31 EDT

--- Bug imported by bugzilla@serpentine.com 2012-05-12 08:44 EDT  ---

This bug was previously known as _bug_ 787 at http://mercurial.selenic.com/bts/issue787