/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: Vincent Ladeuil
  • Date: 2007-10-23 07:15:13 UTC
  • mfrom: (2926 +trunk)
  • mto: (2961.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 2962.
  • Revision ID: v.ladeuil+lp@free.fr-20071023071513-elryt6g2at34d2ur
merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
116
116
            self._timezone = int(timezone)
117
117
 
118
118
        self._generate_revision_if_needed()
119
 
        self._repo_graph = repository.get_graph()
 
119
        self._heads = graph.HeadsCache(repository.get_graph()).heads
120
120
 
121
121
    def commit(self, message):
122
122
        """Make the actual commit.
285
285
        # XXX: Friction: parent_candidates should return a list not a dict
286
286
        #      so that we don't have to walk the inventories again.
287
287
        parent_candiate_entries = ie.parent_candidates(parent_invs)
288
 
        head_set = self._repo_graph.heads(parent_candiate_entries.keys())
 
288
        head_set = self._heads(parent_candiate_entries.keys())
289
289
        heads = []
290
290
        for inv in parent_invs:
291
291
            if ie.file_id in inv:
318
318
            if kind != parent_entry.kind:
319
319
                store = True
320
320
        if kind == 'file':
 
321
            assert content_summary[2] is not None, \
 
322
                "Files must not have executable = None"
321
323
            if not store:
322
324
                if (# if the file length changed we have to store:
323
325
                    parent_entry.text_size != content_summary[1] or
2486
2488
        self.revision_versions = {}
2487
2489
        self.revision_parents = {}
2488
2490
        self.repo_graph = self.repository.get_graph()
2489
 
        self.rev_heads = {}
 
2491
        # XXX: RBC: I haven't tracked down what uses this, but it would be
 
2492
        # better to use the headscache directly I think.
 
2493
        self.heads = graph.HeadsCache(self.repo_graph).heads
2490
2494
 
2491
2495
    def add_revision_text_versions(self, tree):
2492
2496
        """Cache text version data from the supplied revision tree"""
2531
2535
            self.revision_parents[revision_id] = parents
2532
2536
            return parents
2533
2537
 
2534
 
    def heads(self, revision_ids):
2535
 
        revision_ids = tuple(revision_ids)
2536
 
        try:
2537
 
            return self.rev_heads[revision_ids]
2538
 
        except KeyError:
2539
 
            heads = self.repo_graph.heads(revision_ids)
2540
 
            self.rev_heads[revision_ids] = heads
2541
 
            return heads
2542
2538
 
2543
2539
class VersionedFileChecker(object):
2544
2540