~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/log.py

  • Committer: John Arbash Meinel
  • Date: 2010-02-04 16:06:36 UTC
  • mfrom: (5007 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5023.
  • Revision ID: john@arbash-meinel.com-20100204160636-xqeuwz8bwt8bbts4
Merge bzr.dev 5007, resolve conflict, update NEWS

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006, 2007, 2009 Canonical Ltd
 
1
# Copyright (C) 2005-2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
534
534
 
535
535
 
536
536
def _generate_all_revisions(branch, start_rev_id, end_rev_id, direction,
537
 
    delayed_graph_generation):
 
537
                            delayed_graph_generation):
538
538
    # On large trees, generating the merge graph can take 30-60 seconds
539
539
    # so we delay doing it until a merge is detected, incrementally
540
540
    # returning initial (non-merge) revisions while we can.
 
541
 
 
542
    # The above is only true for old formats (<= 0.92), for newer formats, a
 
543
    # couple of seconds only should be needed to load the whole graph and the
 
544
    # other graph operations needed are even faster than that -- vila 100201
541
545
    initial_revisions = []
542
546
    if delayed_graph_generation:
543
547
        try:
544
 
            for rev_id, revno, depth in \
545
 
                _linear_view_revisions(branch, start_rev_id, end_rev_id):
 
548
            for rev_id, revno, depth in  _linear_view_revisions(
 
549
                branch, start_rev_id, end_rev_id):
546
550
                if _has_merges(branch, rev_id):
 
551
                    # The end_rev_id can be nested down somewhere. We need an
 
552
                    # explicit ancestry check. There is an ambiguity here as we
 
553
                    # may not raise _StartNotLinearAncestor for a revision that
 
554
                    # is an ancestor but not a *linear* one. But since we have
 
555
                    # loaded the graph to do the check (or calculate a dotted
 
556
                    # revno), we may as well accept to show the log... 
 
557
                    # -- vila 100201
 
558
                    graph = branch.repository.get_graph()
 
559
                    if not graph.is_ancestor(start_rev_id, end_rev_id):
 
560
                        raise _StartNotLinearAncestor()
547
561
                    end_rev_id = rev_id
548
562
                    break
549
563
                else: