~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bundle/apply_bundle.py

  • Committer: Aaron Bentley
  • Date: 2006-05-30 15:18:12 UTC
  • mto: This revision was merged to the branch mainline in revision 1738.
  • Revision ID: abentley@panoramicfeedback.com-20060530151812-0e3e9b78cc15a804
Rename changesets to revision bundles

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
"""\
2
 
This contains functionality for installing changesets into repositories
 
2
This contains functionality for installing bundles into repositories
3
3
"""
4
4
 
5
5
import bzrlib.ui
8
8
from bzrlib.repository import install_revision
9
9
 
10
10
 
11
 
def install_changeset(repository, changeset_reader):
 
11
def install_bundle(repository, bundle_reader):
12
12
    pb = bzrlib.ui.ui_factory.nested_progress_bar()
13
13
    repository.lock_write()
14
14
    try:
15
 
        real_revisions = changeset_reader.info.real_revisions
 
15
        real_revisions = bundle_reader.info.real_revisions
16
16
        for i, revision in enumerate(reversed(real_revisions)):
17
17
            pb.update("Install revisions",i, len(real_revisions))
18
18
            if repository.has_revision(revision.revision_id):
19
19
                continue
20
 
            cset_tree = changeset_reader.revision_tree(repository,
 
20
            cset_tree = bundle_reader.revision_tree(repository,
21
21
                                                       revision.revision_id)
22
22
            install_revision(repository, revision, cset_tree)
23
23
    finally:
25
25
        pb.finished()
26
26
 
27
27
 
28
 
def merge_changeset(reader, tree, check_clean, merge_type, 
 
28
def merge_bundle(reader, tree, check_clean, merge_type, 
29
29
                    reprocess, show_base):
30
 
    """Merge a changeset's revision into the current tree."""
 
30
    """Merge a revision bundle into the current tree."""
31
31
    pb = bzrlib.ui.ui_factory.nested_progress_bar()
32
32
    try:
33
33
        pp = ProgressPhase("Merge phase", 6, pb)
34
34
        pp.next_phase()
35
 
        install_changeset(tree.branch.repository, reader)
 
35
        install_bundle(tree.branch.repository, reader)
36
36
        merger = Merger(tree.branch, this_tree=tree, pb=pb)
37
37
        merger.pp = pp
38
38
        merger.pp.next_phase()