~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repofmt/pack_repo.py

  • Committer: John Arbash Meinel
  • Date: 2009-05-29 15:12:14 UTC
  • mto: This revision was merged to the branch mainline in revision 4460.
  • Revision ID: john@arbash-meinel.com-20090529151214-88xyma7slrvumx7a
Remove some of the code duplication.
Discover a slightly broken bit of code that was finding parent inventories 2x.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2403
2403
        self._text_keys = None
2404
2404
        self._text_fetch_order = 'unordered'
2405
2405
 
2406
 
    def _find_parent_ids(self, revision_ids):
2407
 
        parent_map = self.from_repository.get_parent_map(revision_ids)
2408
 
        parent_ids = set()
2409
 
        map(parent_ids.update, parent_map.itervalues())
2410
 
        parent_ids.difference_update(parent_map)
2411
 
        parent_ids.discard(_mod_revision.NULL_REVISION)
2412
 
        return parent_ids
2413
 
 
2414
2406
    def _get_filtered_inv_stream(self, revision_ids):
2415
 
        parent_ids = self._find_parent_ids(revision_ids)
2416
2407
        from_repo = self.from_repository
 
2408
        parent_ids = from_repo._find_parent_ids_of_revisions(revision_ids)
2417
2409
        parent_keys = [(p,) for p in parent_ids]
2418
2410
        find_text_keys = from_repo._find_text_key_references_from_xml_inventory_lines
2419
2411
        parent_text_keys = set(find_text_keys(