[issue3281] hg clone over http fails on subrepo

Pedro Pinto bugs at mercurial.selenic.com
Fri Feb 24 13:54:26 CST 2012


New submission from Pedro Pinto <quixote72 at hotmail.com>:

I have a sub repo that I changed from a http:// reference to a local dir. 
i.e, where at some point I had:

sub_repo = http://url_to_sub_repo

I now have:

sub_repo=sub_repo

After committing this change I am unable to clone the parent repo via 
http+hg serve. Cloning using a file url works fine. I.e:

jenkins at lab-lx4:~$ cd repo
jenkins at lab-lx4:~/repo$ cat .hgsub
jenkins at lab-lx4:~/repo$ sub_repo = sub_repo
jenkins at lab-lx4:~/repo$ hg serve &
jenkins at lab-lx4:~/repo$ cd ..
jenkins at lab-lx4:~$ hg clone http://localhost:8000
adding changesets
adding manifests
adding file changes
added 444 changesets with 28438 changes to 25618 files
updating to branch default
** unknown exception encountered, please report by visiting
**  http://mercurial.selenic.com/wiki/BugTracker
** Python 2.7.2+ (default, Oct  4 2011, 20:06:09) [GCC 4.6.1]
** Mercurial Distributed SCM (version 1.9.1)
** Extensions loaded: kbfiles, purge, fetch, rebase, color, kilnauth, 
kilnpath, mq
Traceback (most recent call last):
  File "/usr/bin/hg", line 38, in <module>
    mercurial.dispatch.run()
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 27, in 
run
    sys.exit(dispatch(request(sys.argv[1:])))
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 64, in 
dispatch
    return _runcatch(req)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 87, in 
_runcatch
    return _dispatch(req)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 679, 
in _dispatch
    cmdpats, cmdoptions)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 454, 
in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/lib/python2.7/dist-packages/mercurial/extensions.py", line 182, 
in wrap
    return wrapper(origfn, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/hgext/color.py", line 368, in 
colorcmd
    return orig(ui_, opts, cmd, cmdfunc)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 733, 
in _runcommand
    return checkargs()
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 687, 
in checkargs
    return cmdfunc()
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 676, 
in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 385, in 
check
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/mercurial/commands.py", line 1041, 
in clone
    branch=opts.get('branch'))
  File "/usr/lib/python2.7/dist-packages/mercurial/hg.py", line 366, in 
clone
    _update(destrepo, uprev)
  File "/usr/lib/python2.7/dist-packages/mercurial/extensions.py", line 182, 
in wrap
    return wrapper(origfn, *args, **kwargs)
  File "/usr/share/pyshared/KilnExtensions/bfiles/kbfiles/bfsetup.py", line 
1021, in hg_update
    result = orig(repo, node)
  File "/usr/lib/python2.7/dist-packages/mercurial/hg.py", line 395, in 
update
    stats = mergemod.update(repo, node, False, False, None)
  File "/usr/lib/python2.7/dist-packages/mercurial/merge.py", line 554, in 
update
    stats = applyupdates(repo, action, wc, p2, pa, overwrite)
  File "/usr/lib/python2.7/dist-packages/mercurial/merge.py", line 355, in 
applyupdates
    subrepo.submerge(repo, wctx, mctx, wctx, overwrite)
  File "/usr/lib/python2.7/dist-packages/mercurial/subrepo.py", line 156, in 
submerge
    mctx.sub(s).get(r)
  File "/usr/lib/python2.7/dist-packages/mercurial/context.py", line 210, in 
sub
    return subrepo.subrepo(self, path)
  File "/usr/lib/python2.7/dist-packages/mercurial/subrepo.py", line 245, in 
subrepo
    return types[state[2]](ctx, path, state[:2])
  File "/usr/lib/python2.7/dist-packages/mercurial/subrepo.py", line 348, in 
__init__
    self._initrepo(r, state[0], create)
  File "/usr/lib/python2.7/dist-packages/mercurial/subrepo.py", line 363, in 
_initrepo
    defpath = _abssource(self._repo, abort=False)
  File "/usr/lib/python2.7/dist-packages/mercurial/subrepo.py", line 207, in 
_abssource
    parent.path = posixpath.join(parent.path, source.path)
  File "/usr/lib/python2.7/posixpath.py", line 68, in join
    elif path == '' or path.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'

----------
messages: 19161
nosy: ppinto
priority: bug
status: unread
title: hg clone over http fails on subrepo

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue3281>
____________________________________________________


More information about the Mercurial-devel mailing list