158
161
self.addCleanup(unstacked_repo.unlock)
159
162
self.assertFalse(unstacked_repo.has_revision('left'))
160
163
self.assertFalse(unstacked_repo.has_revision('right'))
162
set([('left',), ('right',), ('merge',)]),
163
unstacked_repo.inventories.keys())
164
self.assertTrue(unstacked_repo.has_revision('merge'))
165
# We used to check for the presence of parent invs here, but what
166
# really matters is that the repo can stream the new revision without
167
# the help of any fallback repos.
168
self.assertCanStreamRevision(unstacked_repo, 'merge')
170
# set([('left',), ('right',), ('merge',)]),
171
# unstacked_repo.inventories.keys())
173
def assertCanStreamRevision(self, repo, revision_id):
174
exclude_keys = set(repo.all_revision_ids()) - set([revision_id])
175
search = SearchResult([revision_id], exclude_keys, 1, [revision_id])
176
source = repo._get_source(repo._format)
177
for substream_kind, substream in source.get_stream(search):
178
# Consume the substream
165
181
def test_fetch_missing_basis_text(self):
166
182
"""If fetching a delta, we should die if a basis is not present."""