~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bundle/apply_bundle.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-06-03 20:18:35 UTC
  • mfrom: (1185.82.137 w-changeset)
  • Revision ID: pqm@pqm.ubuntu.com-20060603201835-1c9a1725641ccd24
Implement bundles

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
from bzrlib.progress import ProgressPhase
7
7
from bzrlib.merge import Merger
8
8
from bzrlib.repository import install_revision
9
 
from bzrlib.trace import note
10
9
 
11
10
 
12
11
def install_bundle(repository, bundle_reader):
13
12
    pb = bzrlib.ui.ui_factory.nested_progress_bar()
14
13
    repository.lock_write()
15
14
    try:
16
 
        real_revisions = bundle_reader.real_revisions
 
15
        real_revisions = bundle_reader.info.real_revisions
17
16
        for i, revision in enumerate(reversed(real_revisions)):
18
17
            pb.update("Install revisions",i, len(real_revisions))
19
18
            if repository.has_revision(revision.revision_id):
38
37
        merger.pp = pp
39
38
        merger.pp.next_phase()
40
39
        merger.check_basis(check_clean, require_commits=False)
41
 
        merger.other_rev_id = reader.target
42
 
        merger.other_tree = merger.revision_tree(reader.target)
43
 
        merger.other_basis = reader.target
 
40
        merger.other_rev_id = reader.info.target
 
41
        merger.other_tree = merger.revision_tree(reader.info.target)
 
42
        merger.other_basis = reader.info.target
44
43
        merger.pp.next_phase()
45
44
        merger.find_base()
46
45
        if merger.base_rev_id == merger.other_rev_id: