def _setCurrentRev(self, rev, branch='default'):
        """Return a deferred to set current revision in persistent state."""
        self.lastRev[branch] = str(rev)
        return self.setState('lastRev', self.lastRev)