/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-07-11 19:44:51 UTC
  • mto: This revision was merged to the branch mainline in revision 2606.
  • Revision ID: abentley@panoramicfeedback.com-20070711194451-3jqhye1nnd02a9uv
Restore original Branch.last_revision behavior, fix bits that care

Show diffs side-by-side

added added

removed removed

Lines of Context:
457
457
        if ph:
458
458
            return ph[-1]
459
459
        else:
460
 
            return _mod_revision.NULL_REVISION
 
460
            return None
461
461
 
462
462
    def last_revision_info(self):
463
463
        """Return information about the last revision.
1452
1452
                stop_revision = osutils.safe_revision_id(stop_revision)
1453
1453
            # whats the current last revision, before we fetch [and change it
1454
1454
            # possibly]
1455
 
            last_rev = self.last_revision()
 
1455
            last_rev = _mod_revision.ensure_null(self.last_revision())
1456
1456
            # we fetch here regardless of whether we need to so that we pickup
1457
1457
            # filled in ghosts.
1458
1458
            self.fetch(other, stop_revision)
1782
1782
        # last_rev is not in the other_last_rev history, AND
1783
1783
        # other_last_rev is not in our history, and do it without pulling
1784
1784
        # history around
1785
 
        last_rev = self.last_revision()
 
1785
        last_rev = _mod_revision.ensure_null(self.last_revision())
1786
1786
        if not _mod_revision.is_null(last_rev):
1787
1787
            other.lock_read()
1788
1788
            try:
1816
1816
        if master is not None:
1817
1817
            old_tip = self.last_revision()
1818
1818
            self.pull(master, overwrite=True)
1819
 
            if old_tip in self.repository.get_ancestry(self.last_revision(),
1820
 
                                                       topo_sorted=False):
 
1819
            if old_tip in self.repository.get_ancestry(
 
1820
                _mod_revision.ensure_null(self.last_revision()),
 
1821
                topo_sorted=False):
1821
1822
                return None
1822
1823
            return old_tip
1823
1824
        return None
1937
1938
    def last_revision(self):
1938
1939
        """Return last revision id, or None"""
1939
1940
        revision_id = self.last_revision_info()[1]
 
1941
        if revision_id == _mod_revision.NULL_REVISION:
 
1942
            revision_id = None
1940
1943
        return revision_id
1941
1944
 
1942
1945
    def _write_last_revision_info(self, revno, revision_id):
1962
1965
        self._clear_cached_state()
1963
1966
 
1964
1967
    def _check_history_violation(self, revision_id):
1965
 
        last_revision = self.last_revision()
 
1968
        last_revision = _mod_revision.ensure_null(self.last_revision())
1966
1969
        if _mod_revision.is_null(last_revision):
1967
1970
            return
1968
1971
        if last_revision not in self._lefthand_history(revision_id):