[Bug 3741] New: hg clone IndexError: tuple index out of range
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Sat Dec 22 06:35:25 CST 2012
On 22 déc. 2012, at 12:48, bugzilla-daemon at bz.selenic.com wrote:
> http://bz.selenic.com/show_bug.cgi?id=3741
>
> Priority: normal
> Bug ID: 3741
> CC: mercurial-devel at selenic.com
> Assignee: bugzilla at selenic.com
> Summary: hg clone IndexError: tuple index out of range
> Severity: bug
> Classification: Unclassified
> OS: Linux
> Reporter: umailedit at yahoo.com
> Hardware: PC
> Status: UNCONFIRMED
> Version: 2.4.1
> Component: Mercurial
> Product: Mercurial
>
> I was trying to clone my software repo from one dedicated server to another and
> I got this instruction to notify you:
>
> On the From server I found this error in the log:
>
> 2012/12/22 12:13:40 [error] 5505#0: *4991 open()
> "/home/merc/sveena/.hg/store/obsstore" failed (2: No such file or directory),
> client: 63.141.228.2, server: source.sveena.com, request: "GET
> /hg/sveena/.hg/store/obsstore HTTP/1.1", host: "source.sveena.com"
That is not related to your issue, ".hg/store/obsstore" is used to store a kind of data you likely do not have in you repo. That is why the file does not exist and this is a perfectly sane situation.
Note: You are using the static HTTP method which is much slower and not recommended
> On the to server: ( I get the same error at two other servers all running
> centos 6 hg 2.4.1)
>
> merc $hg -v clone http://source.sveena.com/hg/sveena/
> (falling back to static-http)
> destination directory: sveena
> requesting all changes
> 3 changesets found
> adding changesets
> adding manifests
> adding file changes
> transaction abort!
> rollback completed
> ** unknown exception encountered, please report by visiting
> ** http://mercurial.selenic.com/wiki/BugTracker
> ** Python 2.6.6 (r266:84292, Sep 11 2012, 08:34:23) [GCC 4.4.6 20120305 (Red
> Hat 4.4.6-4)]
> ** Mercurial Distributed SCM (version 2.4.1)
> ** Extensions loaded:
> Traceback (most recent call last):
> File "/usr/bin/hg", line 38, in <module>
> mercurial.dispatch.run()
> File "/usr/lib64/python2.6/site-packages/mercurial/dispatch.py", line 28, in
> run
> sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
> File "/usr/lib64/python2.6/site-packages/mercurial/dispatch.py", line 65, in
> dispatch
> return _runcatch(req)
> File "/usr/lib64/python2.6/site-packages/mercurial/dispatch.py", line 88, in
> _runcatch
> return _dispatch(req)
> File "/usr/lib64/python2.6/site-packages/mercurial/dispatch.py", line 741, in
> _dispatch
> cmdpats, cmdoptions)
> File "/usr/lib64/python2.6/site-packages/mercurial/dispatch.py", line 514, in
> runcommand
> ret = _runcommand(ui, options, cmd, d)
> File "/usr/lib64/python2.6/site-packages/mercurial/dispatch.py", line 831, in
> _runcommand
> return checkargs()
> File "/usr/lib64/python2.6/site-packages/mercurial/dispatch.py", line 802, in
> checkargs
> return cmdfunc()
> File "/usr/lib64/python2.6/site-packages/mercurial/dispatch.py", line 738, in
> <lambda>
> d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
> File "/usr/lib64/python2.6/site-packages/mercurial/util.py", line 472, in
> check
> return func(*args, **kwargs)
> File "/usr/lib64/python2.6/site-packages/mercurial/commands.py", line 1221,
> in clone
> branch=opts.get('branch'))
> File "/usr/lib64/python2.6/site-packages/mercurial/hg.py", line 381, in clone
> destpeer.local().clone(srcpeer, heads=revs, stream=stream)
> File "/usr/lib64/python2.6/site-packages/mercurial/localrepo.py", line 2582,
> in clone
> return self.pull(remote, heads)
> File "/usr/lib64/python2.6/site-packages/mercurial/localrepo.py", line 1771,
> in pull
> result = self.addchangegroup(cg, 'pull', remote.url())
> File "/usr/lib64/python2.6/site-packages/mercurial/localrepo.py", line 2375,
> in addchangegroup
> if not fl.addgroup(source, revmap, trp):
> File "/usr/lib64/python2.6/site-packages/mercurial/revlog.py", line 1197, in
> addgroup
> chunkdata = bundle.deltachunk(chain)
> File "/usr/lib64/python2.6/site-packages/mercurial/changegroup.py", line 187,
> in deltachunk
> l = self.chunklength()
> File "/usr/lib64/python2.6/site-packages/mercurial/changegroup.py", line 152,
> in chunklength
> d = readexactly(self._stream, 4)
> File "/usr/lib64/python2.6/site-packages/mercurial/changegroup.py", line 17,
> in readexactly
> s = stream.read(n)
> File "/usr/lib64/python2.6/site-packages/mercurial/util.py", line 908, in
> read
> for chunk in self.iter:
> File "/usr/lib64/python2.6/site-packages/mercurial/util.py", line 886, in
> splitbig
> for chunk in chunks:
> File "/usr/lib64/python2.6/site-packages/mercurial/localrepo.py", line 2256,
> in gengroup
> filerevlog = self.file(fname)
> File "/usr/lib64/python2.6/site-packages/mercurial/localrepo.py", line 798,
> in file
> return filelog.filelog(self.sopener, f)
> File "/usr/lib64/python2.6/site-packages/mercurial/filelog.py", line 35, in
> __init__
> "/".join(("data", path + ".i")))
> File "/usr/lib64/python2.6/site-packages/mercurial/revlog.py", line 215, in
> __init__
> i = f.read()
> File "/usr/lib64/python2.6/site-packages/mercurial/statichttprepo.py", line
> 44, in read
> raise IOError(None, inst.reason[1])
> IndexError: tuple index out of range
The IndexError comes from the last line of this block:
try:
f = self.opener.open(req)
data = f.read()
# Python 2.6+ defines a getcode() function, and 2.4 and
# 2.5 appear to always have an undocumented code attribute
# set. If we can't read either of those, fall back to 206
# and hope for the best.
code = getattr(f, 'getcode', lambda : getattr(f, 'code', 206))()
except urllib2.HTTPError, inst:
num = inst.code == 404 and errno.ENOENT or None
raise IOError(num, inst)
except urllib2.URLError, inst:
raise IOError(None, inst.reason[1])
So we are failing while trying to propagate an http error :-/
As URLError can you try running a client with the two last line dropped ?
- except urllib2.URLError, inst:
- raise IOError(None, inst.reason[1])
That should gives you a much better error message.
--
Pierre-Yves
More information about the Mercurial-devel
mailing list