~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Martin Pool
  • Date: 2007-12-14 07:35:49 UTC
  • mfrom: (3109 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3111.
  • Revision ID: mbp@sourcefrog.net-20071214073549-wpekccrsxjv77yze
Merge 1.0final back to trunk and bump to 1.1dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1794
1794
        # last_rev is not in the other_last_rev history, AND
1795
1795
        # other_last_rev is not in our history, and do it without pulling
1796
1796
        # history around
1797
 
        last_rev = _mod_revision.ensure_null(self.last_revision())
1798
 
        if last_rev != _mod_revision.NULL_REVISION:
1799
 
            other.lock_read()
1800
 
            try:
1801
 
                other_last_rev = other.last_revision()
1802
 
                if not _mod_revision.is_null(other_last_rev):
1803
 
                    # neither branch is new, we have to do some work to
1804
 
                    # ascertain diversion.
1805
 
                    remote_graph = other.repository.get_revision_graph(
1806
 
                        other_last_rev)
1807
 
                    local_graph = self.repository.get_revision_graph(last_rev)
1808
 
                    if (last_rev not in remote_graph and
1809
 
                        other_last_rev not in local_graph):
1810
 
                        raise errors.DivergedBranches(self, other)
1811
 
            finally:
1812
 
                other.unlock()
1813
1797
        self.set_bound_location(other.base)
1814
1798
 
1815
1799
    @needs_write_lock