[issue1851] can't clone from a repository that contains sub-repositories when the host the sub-repos reference is offline
Monroe Williams
bugs at mercurial.selenic.com
Fri Oct 2 22:37:06 UTC 2009
New submission from Monroe Williams <monroe at criticalpath.com>:
Setup:
- create a repository on host A which references a sub-repository on host B.
- take host B offline
- clone the repository onto host C
the 'hg clone' hangs trying to contact host B.
It's not entirely clear what the best behavior in this case would be, since
letting the clone succeed would leave your local repository in a strange
state, with the subrepo(s) unpopulated.
As it is now the clone fails before the local working directory is
populated, so you can't even see the contents of the repo that's online. It
seems like it would be better to warn about the failure cloning the
subrepo(s) and at least finish the clone of what you can access.
Traceback of the failure:
$ hg clone --traceback ssh://hostA.something.com/mumble/
destination directory: mumble
requesting all changes
adding changesets
adding manifests
adding file changes
added 2791 changesets with 57556 changes to 15188 files
updating working directory
pulling subrepo path/to/hostB/subrepo
Traceback (most recent call last):
File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 43,
in _runcatch
return _dispatch(ui, args)
File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 449,
in _dispatch
return runcommand(lui, repo, cmd, fullargs, ui, options, d)
File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 317,
in runcommand
ret = _runcommand(ui, options, cmd, d)
File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 501,
in _runcommand
return checkargs()
File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 454,
in checkargs
return cmdfunc()
File "/Library/Python/2.6/site-packages/mercurial/dispatch.py", line 448,
in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
File "/Library/Python/2.6/site-packages/mercurial/util.py", line 402, in
check
return func(*args, **kwargs)
File "/Library/Python/2.6/site-packages/mercurial/commands.py", line 636,
in clone
update=not opts.get('noupdate'))
File "/Library/Python/2.6/site-packages/mercurial/hg.py", line 313, in
clone
_update(dest_repo, uprev)
File "/Library/Python/2.6/site-packages/mercurial/hg.py", line 331, in
update
stats = _merge.update(repo, node, False, False, None)
File "/Library/Python/2.6/site-packages/mercurial/merge.py", line 468, in
update
stats = applyupdates(repo, action, wc, p2)
File "/Library/Python/2.6/site-packages/mercurial/merge.py", line 309, in
applyupdates
subrepo.submerge(repo, wctx, mctx, wctx)
File "/Library/Python/2.6/site-packages/mercurial/subrepo.py", line 92, in
submerge
wctx.sub(s).get(r)
File "/Library/Python/2.6/site-packages/mercurial/subrepo.py", line 179,
in get
other = hg.repository(self._repo.ui, srcurl)
File "/Library/Python/2.6/site-packages/mercurial/hg.py", line 63, in
repository
repo = _lookup(path).instance(ui, path, create)
File "/Library/Python/2.6/site-packages/mercurial/httprepo.py", line 254,
in instance
inst.between([(nullid, nullid)])
File "/Library/Python/2.6/site-packages/mercurial/httprepo.py", line 175,
in between
d = self.do_read("between", pairs=n)
File "/Library/Python/2.6/site-packages/mercurial/httprepo.py", line 126,
in do_read
fp = self.do_cmd(cmd, **args)
File "/Library/Python/2.6/site-packages/mercurial/httprepo.py", line 79,
in do_cmd
resp = self.urlopener.open(urllib2.Request(cu, data, headers))
File
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urll
ib2.py", line 383, in open
response = self._open(req, data)
File
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urll
ib2.py", line 401, in _open
'_open', req)
File
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urll
ib2.py", line 361, in _call_chain
result = func(*args)
File "/Library/Python/2.6/site-packages/mercurial/url.py", line 383, in
http_open
return self.do_open(httpconnection, req)
File "/Library/Python/2.6/site-packages/mercurial/keepalive.py", line 248,
in do_open
raise urllib2.URLError(err)
URLError: <urlopen error [Errno 60] Operation timed out>
abort: error: Operation timed out
----------
messages: 10617
nosy: bos, monroe
priority: critical
status: unread
title: can't clone from a repository that contains sub-repositories when the host the sub-repos reference is offline
____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue1851>
____________________________________________________
More information about the Mercurial-devel
mailing list