def _trim(self):
        """
        Removes oldest backups that exceed the limit configured in backup_count
        option.

        Does not write back to file system, make sure to call self._write()
        afterwards.
        """
        index = self._get_index()
        backup_limit = config().backup_count() - 1

        for changeset in index[backup_limit:]:
            self.delete(changeset[0], p_write=False)
def _trim ( self ) : index = self . _get_index ( ) backup_limit = config ( ) . backup_count ( ) - 1 for changeset in index [ backup_limit : ] : self . delete ( changeset [ 0 ] , p_write = False )
Removes oldest backups that exceed the limit configured in backup_count
        option.

        Does not write back to file system, make sure to call self._write()
        afterwards.