4412
4412
yield versionedfile.FulltextContentFactory(
4413
4413
key, parent_keys, None, as_bytes)
4416
def _iter_for_revno(repo, partial_history_cache, stop_index=None,
4417
stop_revision=None):
4418
"""Extend the partial history to include a given index
4420
If a stop_index is supplied, stop when that index has been reached.
4421
If a stop_revision is supplied, stop when that revision is
4422
encountered. Otherwise, stop when the beginning of history is
4425
:param stop_index: The index which should be present. When it is
4426
present, history extension will stop.
4427
:param stop_revision: The revision id which should be present. When
4428
it is encountered, history extension will stop.
4430
mutter('partial_history_cache: %r', partial_history_cache)
4431
mutter('stop_index: %d', stop_index)
4432
start_revision = partial_history_cache[-1]
4433
iterator = repo.iter_reverse_revision_history(start_revision)
4435
#skip the last revision in the list
4436
next_revision = iterator.next()
4438
if (stop_index is not None and
4439
len(partial_history_cache) > stop_index):
4441
revision_id = iterator.next()
4442
partial_history_cache.append(revision_id)
4443
if revision_id == stop_revision:
4445
except StopIteration: