/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/merge_directive.py

  • Committer: Aaron Bentley
  • Date: 2007-04-01 03:52:31 UTC
  • mto: This revision was merged to the branch mainline in revision 2389.
  • Revision ID: aaron.bentley@utoronto.ca-20070401035231-w87zy7hrpre4v81m
rename get_target_revision to install_revisions

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
    )
31
31
from bzrlib.bundle import (
32
32
    serializer as bundle_serializer,
33
 
    apply_bundle,
34
33
    )
35
34
 
36
35
 
251
250
                                       ancestor_id, s)
252
251
        return s.getvalue()
253
252
 
254
 
    def get_target_revision(self, target_repo):
255
 
        """Install the target revision and return its revision-id"""
 
253
    def install_revisions(self, target_repo):
 
254
        """Install revisions and return the target revision"""
256
255
        if not target_repo.has_revision(self.revision_id):
257
256
            if self.patch_type == 'bundle':
258
 
                reader = bundle_serializer.read_bundle(StringIO(self.patch))
259
 
                apply_bundle.install_bundle(target_repo, reader)
 
257
                info = bundle_serializer.read_bundle(StringIO(self.patch))
 
258
                # We don't use the bundle's target revision, because
 
259
                # MergeDirective.revision_id is authoritative.
 
260
                info.install_revisions(target_repo)
260
261
            else:
261
262
                source_branch = _mod_branch.Branch.open(self.source_branch)
262
263
                target_repo.fetch(source_branch.repository, self.revision_id)