~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge.py

  • Committer: Aaron Bentley
  • Date: 2007-07-30 17:52:54 UTC
  • mto: (1551.19.24 Aaron's mergeable stuff)
  • mto: This revision was merged to the branch mainline in revision 2664.
  • Revision ID: abentley@panoramicfeedback.com-20070730175254-b8fa40bg5q7uysof
Textual updates from review

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
 
92
92
    @staticmethod
93
93
    def from_uncommitted(tree, other_tree, pb):
 
94
        """Return a Merger for uncommitted changes in other_tree.
 
95
 
 
96
        :param tree: The tree to merge into
 
97
        :param other_tree: The tree to get uncommitted changes from
 
98
        :param pb: A progress indicator
 
99
        """
94
100
        merger = Merger(tree.branch, other_tree, other_tree.basis_tree(), tree,
95
101
                        pb)
96
102
        merger.base_rev_id = merger.base_tree.get_revision_id()
99
105
 
100
106
    @classmethod
101
107
    def from_mergeable(klass, tree, mergeable, pb):
 
108
        """Return a Merger for a bundle or merge directive.
 
109
 
 
110
        :param tree: The tree to merge changes into
 
111
        :param mergeable: A merge directive or bundle
 
112
        :param pb: A progress indicator
 
113
        """
102
114
        mergeable.install_revisions(tree.branch.repository)
103
115
        base_revision_id, other_revision_id, verified =\
104
116
            mergeable.get_merge_request(tree.branch.repository)
112
124
    @staticmethod
113
125
    def from_revision_ids(pb, this, other, base=None, other_branch=None,
114
126
                          base_branch=None):
 
127
        """Return a Merger for revision-ids.
 
128
 
 
129
        :param tree: The tree to merge changes into
 
130
        :param other: The revision-id to use as OTHER
 
131
        :param base: The revision-id to use as BASE.  If not specified, will
 
132
            be auto-selected.
 
133
        :param other_branch: A branch containing the other revision-id.  If
 
134
            not supplied, this.branch is used.
 
135
        :param base_branch: A branch containing the base revision-id.  If
 
136
            not supplied, other_branch or this.branch will be used.
 
137
        :param pb: A progress indicator
 
138
        """
115
139
        merger = Merger(this.branch, this_tree=this, pb=pb)
116
140
        if other_branch is None:
117
141
            other_branch = this.branch