~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

Add MemoryTree.last_revision.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1299
1299
 
1300
1300
    @needs_read_lock
1301
1301
    def last_revision(self):
1302
 
        """Return the last revision id of this working tree.
1303
 
 
1304
 
        In early branch formats this was == the branch last_revision,
1305
 
        but that cannot be relied upon - for working tree operations,
1306
 
        always use tree.last_revision().
 
1302
        """Return the last revision of the branch for this tree.
 
1303
 
 
1304
        This format tree does not support a separate marker for last-revision
 
1305
        compared to the branch.
 
1306
 
 
1307
        See MutableTree.last_revision
1307
1308
        """
1308
1309
        return self.branch.last_revision()
1309
1310
 
1660
1661
 
1661
1662
    @needs_read_lock
1662
1663
    def last_revision(self):
1663
 
        """See WorkingTree.last_revision."""
 
1664
        """See Mutable.last_revision."""
1664
1665
        try:
1665
1666
            return self._control_files.get_utf8('last-revision').read()
1666
1667
        except NoSuchFile: