~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge.py

  • Committer: Jelmer Vernooij
  • Date: 2006-06-13 13:24:40 UTC
  • mfrom: (1767 +trunk)
  • mto: (1769.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 1770.
  • Revision ID: jelmer@samba.org-20060613132440-24e222a86f948f60
[merge] bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
137
137
        trees = (self.this_basis_tree, self.other_tree)
138
138
        return [get_id(tree, file_id) for tree in trees]
139
139
 
140
 
    def check_basis(self, check_clean):
141
 
        if self.this_basis is None:
 
140
    def check_basis(self, check_clean, require_commits=True):
 
141
        if self.this_basis is None and require_commits is True:
142
142
            raise BzrCommandError("This branch has no commits")
143
143
        if check_clean:
144
144
            self.compare_basis()
205
205
        if other_branch.base != self.this_branch.base:
206
206
            self.this_branch.fetch(other_branch, last_revision=self.other_basis)
207
207
 
 
208
    def find_base(self):
 
209
        self.set_base([None, None])
 
210
 
208
211
    def set_base(self, base_revision):
209
212
        mutter("doing merge() with no base_revision specified")
210
213
        if base_revision == [None, None]:
789
792
                                          pb=pb, pp=pp, reprocess=reprocess)
790
793
 
791
794
    def _get_revision_tree(self, tree):
792
 
        """Return a revision tree releated to this tree.
 
795
        """Return a revision tree related to this tree.
793
796
        If the tree is a WorkingTree, the basis will be returned.
794
797
        """
795
798
        if getattr(tree, 'get_weave', False) is False: