~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/log.py

  • Committer: John Arbash Meinel
  • Date: 2009-01-20 20:17:45 UTC
  • mto: This revision was merged to the branch mainline in revision 3949.
  • Revision ID: john@arbash-meinel.com-20090120201745-gkvsfuhc9tf7m1bm
RestoreĀ _linear_view_revisions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
230
230
def calculate_view_revisions(branch, start_revision, end_revision, direction,
231
231
                             specific_fileid, generate_merge_revisions,
232
232
                             allow_single_merge_revision):
 
233
    if (    not generate_merge_revisions
 
234
        and start_revision is end_revision is None
 
235
        and direction == 'reverse'
 
236
        and specific_fileid is None):
 
237
        return _linear_view_revisions(branch)
 
238
 
233
239
    mainline_revs, rev_nos, start_rev_id, end_rev_id = _get_mainline_revs(
234
240
        branch, start_revision, end_revision)
235
241
    if not mainline_revs:
270
276
    return view_revisions
271
277
 
272
278
 
 
279
def _linear_view_revisions(branch):
 
280
    start_revno, start_revision_id = branch.last_revision_info()
 
281
    repo = branch.repository
 
282
    revision_ids = repo.iter_reverse_revision_history(start_revision_id)
 
283
    for num, revision_id in enumerate(revision_ids):
 
284
        yield revision_id, str(start_revno - num), 0
 
285
 
 
286
 
273
287
def make_log_rev_iterator(branch, view_revisions, generate_delta, search):
274
288
    """Create a revision iterator for log.
275
289