Bug 3029 - commit with a missing file in an svn subrepo triggers exception
Summary: commit with a missing file in an svn subrepo triggers exception
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: unspecified
Hardware: All All
: normal bug
Assignee: Bugzilla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-29 05:40 UTC by Pedro Larroy
Modified: 2012-07-10 13:09 UTC (History)
5 users (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro Larroy 2011-09-29 05:40 UTC
piotr@gominola:0:~/devel/mos_development_other$ hg ci
*** failed to import extension hgext.qct: No module named qct
committing subrepository mw/external/cpptoxml
** unknown exception encountered, please report by visiting
**  http://mercurial.selenic.com/wiki/BugTracker
** Python 2.6.7 (r267:88850, Jul 10 2011, 08:11:54) [GCC 4.6.1]
** Mercurial Distributed SCM (version 1.9.2+85-25c08446e03d+20110928)
** Extensions loaded: progress, hgexternals, convert, collapse, hgk, color, 
graphlog, purge, transplant, rebase, record, eol, hgshelve, mq
Traceback (most recent call last):
  File "/usr/local/bin/hg", line 38, in <module>
    mercurial.dispatch.run()
  File "/usr/local/lib/python2.6/dist-packages/mercurial/dispatch.py", line 27, in run
    sys.exit(dispatch(request(sys.argv[1:])))
  File "/usr/local/lib/python2.6/dist-packages/mercurial/dispatch.py", line 64, in 
dispatch
    return _runcatch(req)
  File "/usr/local/lib/python2.6/dist-packages/mercurial/dispatch.py", line 87, in 
_runcatch
    return _dispatch(req)
  File "/usr/local/lib/python2.6/dist-packages/mercurial/dispatch.py", line 684, in 
_dispatch
    cmdpats, cmdoptions)
  File "/usr/local/lib/python2.6/dist-packages/mercurial/dispatch.py", line 466, in 
runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/local/lib/python2.6/dist-packages/mercurial/extensions.py", line 182, in 
wrap
    return wrapper(origfn, *args, **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/hgext/color.py", line 373, in colorcmd
    return orig(ui_, opts, cmd, cmdfunc)
  File "/usr/local/lib/python2.6/dist-packages/mercurial/dispatch.py", line 738, in 
_runcommand
    return checkargs()
  File "/usr/local/lib/python2.6/dist-packages/mercurial/dispatch.py", line 692, in 
checkargs
    return cmdfunc()
  File "/usr/local/lib/python2.6/dist-packages/mercurial/dispatch.py", line 681, in 
<lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/usr/local/lib/python2.6/dist-packages/mercurial/util.py", line 444, in check
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/mercurial/extensions.py", line 137, in 
wrap
    util.checksignature(origfn), *args, **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/mercurial/util.py", line 444, in check
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/hgext/mq.py", line 3230, in 
mqcommand
    return orig(ui, repo, *args, **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/mercurial/util.py", line 444, in check
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/mercurial/commands.py", line 1155, in 
commit
    node = cmdutil.commit(ui, repo, commitfunc, pats, opts)
  File "/usr/local/lib/python2.6/dist-packages/mercurial/cmdutil.py", line 1192, in 
commit
    scmutil.match(repo[None], pats, opts), opts)
  File "/usr/local/lib/python2.6/dist-packages/mercurial/commands.py", line 1150, in 
commitfunc
    editor=e, extra=extra)
  File "/usr/local/lib/python2.6/dist-packages/hgext/mq.py", line 3118, in commit
    editor, extra)
  File "/usr/local/lib/python2.6/dist-packages/mercurial/localrepo.py", line 1103, in 
commit
    sr = sub.commit(cctx._text, user, date)
  File "/usr/local/lib/python2.6/dist-packages/mercurial/subrepo.py", line 654, in 
commit
    raise util.Abort(commitinfo.splitlines()[-1])
IndexError: list index out of range

piotr@gominola:0:~/devel/mos_development_other/mw/external/cpptoxml$ svn st
!       bin/linuxX86_64/cpptoxml


After restoring that it works.

Applies to mercurial revision 85322c19c831
Comment 1 Matt Mackall 2011-09-30 15:21 UTC
Not sure how this happens:

a) subrepo will abort if SVN returns an error code
b) subrepo will ui.warn() if SVN outputs on stderr (not present)
c) commitinfo contains the stdout of SVN, but is empty, causing the exception

..which points to SVN returning completely silently with no error code.

What horrible version of SVN is this?
Comment 2 Pedro Larroy 2011-10-01 05:01 UTC
svn, version 1.6.17 (r1128011)
  compiled Jun  1 2011, 22:14:15


Distributor ID: Debian
Description:    Debian GNU/Linux testing (wheezy)
Release:        testing
Codename:       wheezy
Comment 3 Pedro Larroy 2011-10-01 05:58 UTC
When run manually on the offending subrepo the output is like:

! some/erased/file
Comment 4 Patrick Mézard 2012-04-26 04:23 UTC
Patches submitted here:

  http://selenic.com/pipermail/mercurial-devel/2012-April/039511.html
Comment 5 HG Bot 2012-04-27 12:00 UTC
Fixed by http://selenic.com/repo/hg/rev/3d5d204a08c7
Patrick Mezard <patrick@mezard.eu>
subrepo/svn: abort on commit with missing file (issue3029)

(please test the fix)
Comment 6 Bugzilla 2012-05-12 09:23 UTC

--- Bug imported by bugzilla@serpentine.com 2012-05-12 09:23 EDT  ---

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

Bug Status was UNCONFIRMED but everconfirmed was true
   Setting status to CONFIRMED