~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge.py

  • Committer: Vincent Ladeuil
  • Date: 2007-06-20 14:25:06 UTC
  • mfrom: (2540 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2646.
  • Revision ID: v.ladeuil+lp@free.fr-20070620142506-txsb1v8538kpsafw
merge bzr.dev @ 2540

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
from bzrlib.merge3 import Merge3
42
42
from bzrlib.osutils import rename, pathjoin
43
43
from progress import DummyProgress, ProgressPhase
44
 
from bzrlib.revision import common_ancestor, is_ancestor, NULL_REVISION
 
44
from bzrlib.revision import (is_ancestor, NULL_REVISION, ensure_null)
45
45
from bzrlib.textfile import check_text_lines
46
46
from bzrlib.trace import mutter, warning, note
47
47
from bzrlib.transform import (TreeTransform, resolve_conflicts, cook_conflicts,
259
259
                pb = ui.ui_factory.nested_progress_bar()
260
260
                try:
261
261
                    this_repo = self.this_branch.repository
262
 
                    self.base_rev_id = common_ancestor(self.this_basis, 
263
 
                                                       self.other_basis, 
264
 
                                                       this_repo, pb)
 
262
                    graph = this_repo.get_graph()
 
263
                    revisions = [ensure_null(self.this_basis),
 
264
                                 ensure_null(self.other_basis)]
 
265
                    if NULL_REVISION in revisions:
 
266
                        self.base_rev_id = NULL_REVISION
 
267
                    else:
 
268
                        self.base_rev_id = graph.find_unique_lca(*revisions)
 
269
                        if self.base_rev_id == NULL_REVISION:
 
270
                            raise UnrelatedBranches()
265
271
                finally:
266
272
                    pb.finished()
267
273
            except NoCommonAncestor: