[issue1870] subrepos don't work with shared repos

Chad Dombrova bugs at mercurial.selenic.com
Wed Oct 14 23:38:08 UTC 2009


New submission from Chad Dombrova <chadrik at gmail.com>:

subrepos and shared repos don't mix well, even in the simplest case

the steps to reproduce are pretty straightforward:
1. create repo A
2. create repo B
3. add a file to B and commit
4. make B a subrepo of A
5. share A

here's a script to reproduce the error:

hg init master

hg init asset
cd asset
touch stuff
hg add stuff
hg commit -m "asset stuff"
cd ..

cd master
hg clone ../asset asset
echo "asset = asset" > .hgsub
hg add .hgsub
hg commit -m "added asset subrepo"
cd ..

hg share master slave --debug --traceback

#-------------end--------------

here's the traceback:

Traceback (most recent call last):
  File
"/Volumes/luma/_globalSoft/dev/chad/python/mercurial/mercurial/dispatch.py",
line 46, in _runcatch
    return _dispatch(ui, args)
  File
"/Volumes/luma/_globalSoft/dev/chad/python/mercurial/mercurial/dispatch.py",
line 452, in _dispatch
    return runcommand(lui, repo, cmd, fullargs, ui, options, d)
  File
"/Volumes/luma/_globalSoft/dev/chad/python/mercurial/mercurial/dispatch.py",
line 320, in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File
"/Volumes/luma/_globalSoft/dev/chad/python/mercurial/mercurial/dispatch.py",
line 504, in _runcommand
    return checkargs()
  File
"/Volumes/luma/_globalSoft/dev/chad/python/mercurial/mercurial/dispatch.py",
line 457, in checkargs
    return cmdfunc()
  File
"/Volumes/luma/_globalSoft/dev/chad/python/mercurial/mercurial/dispatch.py",
line 451, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File
"/Volumes/luma/_globalSoft/dev/chad/python/mercurial/mercurial/util.py",
line 402, in check
    return func(*args, **kwargs)
  File "/Volumes/luma/_globalSoft/dev/chad/python/mercurial/hgext/share.py",
line 22, in share
    return hg.share(ui, source, dest, not noupdate)
  File
"/Volumes/luma/_globalSoft/dev/chad/python/mercurial/mercurial/hg.py", line
147, in share
    _update(r, uprev)
  File
"/Volumes/luma/_globalSoft/dev/chad/python/mercurial/mercurial/hg.py", line
339, in update
    stats = _merge.update(repo, node, False, False, None)
  File
"/Volumes/luma/_globalSoft/dev/chad/python/mercurial/mercurial/merge.py",
line 468, in update
    stats = applyupdates(repo, action, wc, p2)
  File
"/Volumes/luma/_globalSoft/dev/chad/python/mercurial/mercurial/merge.py",
line 309, in applyupdates
    subrepo.submerge(repo, wctx, mctx, wctx)
  File "mercurial/subrepo.py", line 92, in submerge
  File "mercurial/subrepo.py", line 185, in get
  File
"/Volumes/luma/_globalSoft/dev/chad/python/mercurial/mercurial/hg.py", line
350, in clean
    stats = _merge.update(repo, node, False, True, None)
  File
"/Volumes/luma/_globalSoft/dev/chad/python/mercurial/mercurial/merge.py",
line 417, in update
    p1, p2 = pl[0], repo[node]
  File
"/Volumes/luma/_globalSoft/dev/chad/python/mercurial/mercurial/localrepo.py", line
123, in __getitem__
    return context.changectx(self, changeid)
  File
"/Volumes/luma/_globalSoft/dev/chad/python/mercurial/mercurial/context.py",
line 27, in __init__
    self._node = self._repo.lookup(changeid)
  File
"/Volumes/luma/_globalSoft/dev/chad/python/mercurial/mercurial/localrepo.py", line
512, in lookup
    raise error.RepoLookupError(_("unknown revision '%s'") % key)
RepoLookupError: unknown revision '8209602c2f67a1831a9ef1e73855714211c932cc'

----------
messages: 10765
nosy: chadrik
priority: bug
status: unread
title: subrepos don't work with shared repos
topic: update

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



More information about the Mercurial-devel mailing list