/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Aaron Bentley
  • Date: 2007-12-20 00:56:46 UTC
  • mfrom: (3131 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3133.
  • Revision ID: aaron.bentley@utoronto.ca-20071220005646-cfebcxoxqtpsk3uo
Merge bzr.dev

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