[issue2137] API: after unbundle, repo.lookup() does not recognized added changeset IDs
Greg Ward
bugs at mercurial.selenic.com
Tue Apr 13 19:19:10 UTC 2010
New submission from Greg Ward <greg-hg at gerg.ca>:
I'm working on a script that does the equivalent of
hg -R target incoming --bundle incoming.bundle master
hg clone target tmptarget
hg -R tmptarget unbundle incoming.bundle
cd tmptarget
for each branch in tmptarget with >1 head:
hg update earlier head on branch
HGMERGE=internal:fail hg merge && hg commit -m"merge" || exit 1
hg push target
in one process. (The reason for tmptarget is that I need a place to do
merges after applying the bundle. I can't do it in target because that's
one of the central repos on my server, and merging might fail. So I must
not add any changesets to target until I know it all went well.)
In certain circumstances, the push to target finds no outgoing changesets
even though unbundle really did add changesets to tmptarget. At a high
level, I can illustrate the problem like this:
tip1 = hgnode.short(tmptarget.changelog.tip())
tip2 = hgnode.short(tmptarget.lookup(tip1))
assert tip1 == tip2
This actually never gets to the assert -- it raises RepoLookupError in the
call to tmptarget.lookup(tmp1), which seems like a violation of some pretty
basic contracts.
I'm still digging. Will post more when I have more info and (hopefully) a
reproduction script.
----------
messages: 12261
nosy: gward
priority: bug
status: unread
title: API: after unbundle, repo.lookup() does not recognized added changeset IDs
____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue2137>
____________________________________________________
More information about the Mercurial-devel
mailing list