/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

  • Committer: Martin Pool
  • Date: 2011-06-28 17:25:26 UTC
  • mfrom: (5999 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6001.
  • Revision ID: mbp@canonical.com-20110628172526-10cok2s17dvw7x62
merge news

Show diffs side-by-side

added added

removed removed

Lines of Context:
522
522
        if revid and committers:
523
523
            result['committers'] = 0
524
524
        if revid and revid != _mod_revision.NULL_REVISION:
 
525
            graph = self.get_graph()
525
526
            if committers:
526
527
                all_committers = set()
527
 
            revisions = self.get_ancestry(revid)
528
 
            # pop the leading None
529
 
            revisions.pop(0)
530
 
            first_revision = None
 
528
            revisions = [r for (r, p) in graph.iter_ancestry([revid])
 
529
                        if r != _mod_revision.NULL_REVISION]
 
530
            last_revision = None
531
531
            if not committers:
532
532
                # ignore the revisions in the middle - just grab first and last
533
533
                revisions = revisions[0], revisions[-1]
534
534
            for revision in self.get_revisions(revisions):
535
 
                if not first_revision:
536
 
                    first_revision = revision
 
535
                if not last_revision:
 
536
                    last_revision = revision
537
537
                if committers:
538
538
                    all_committers.add(revision.committer)
539
 
            last_revision = revision
 
539
            first_revision = revision
540
540
            if committers:
541
541
                result['committers'] = len(all_committers)
542
542
            result['firstrev'] = (first_revision.timestamp,
1056
1056
        raise NotImplementedError(self.revision_trees)
1057
1057
 
1058
1058
    @needs_read_lock
 
1059
    @symbol_versioning.deprecated_method(
 
1060
        symbol_versioning.deprecated_in((2, 4, 0)))
1059
1061
    def get_ancestry(self, revision_id, topo_sorted=True):
1060
1062
        """Return a list of revision-ids integrated by a revision.
1061
1063
 
1065
1067
 
1066
1068
        This is topologically sorted.
1067
1069
        """
 
1070
        if 'evil' in debug.debug_flags:
 
1071
            mutter_callsite(2, "get_ancestry is linear with history.")
1068
1072
        if _mod_revision.is_null(revision_id):
1069
1073
            return [None]
1070
1074
        if not self.has_revision(revision_id):
1405
1409
    revision_graph_can_have_wrong_parents = None
1406
1410
    # Does this format support rich root data?
1407
1411
    rich_root_data = None
 
1412
    # Does this format support explicitly versioned directories?
 
1413
    supports_versioned_directories = None
1408
1414
 
1409
1415
    def __repr__(self):
1410
1416
        return "%s()" % self.__class__.__name__