~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/fetch.py

  • Committer: Robert Collins
  • Date: 2008-01-09 00:51:01 UTC
  • mto: This revision was merged to the branch mainline in revision 3172.
  • Revision ID: robertc@robertcollins.net-20080109005101-mmpiihes7sw3uzr5
Add a test to Repository.deserialise_inventory that the resulting ivnentory is the one asked for, and update relevant tests. Also tweak the model 1 to 2 regenerate inventories logic to use the revision trees parent marker which is more accurate in some cases.

Show diffs side-by-side

added added

removed removed

Lines of Context:
362
362
        stored in the target (reserializing it in a different format).
363
363
        :param revs: The revisions to include
364
364
        """
365
 
        inventory_weave = self.source.get_inventory_weave()
366
365
        for tree in self.iter_rev_trees(revs):
367
 
            parents = inventory_weave.get_parents(tree.get_revision_id())
 
366
            parents = tree.get_parent_ids()
368
367
            self.target.add_inventory(tree.get_revision_id(), tree.inventory,
369
368
                                      parents)
370
369
 
372
371
class Model1toKnit2Fetcher(GenericRepoFetcher):
373
372
    """Fetch from a Model1 repository into a Knit2 repository
374
373
    """
375
 
    def __init__(self, to_repository, from_repository, last_revision=None, 
 
374
    def __init__(self, to_repository, from_repository, last_revision=None,
376
375
                 pb=None):
377
376
        self.helper = Inter1and2Helper(from_repository, to_repository)
378
377
        GenericRepoFetcher.__init__(self, to_repository, from_repository,