def _select_changesets(self, where):
        where = {'changeset':'cs'} % where
        sql = """
            SELECT cs.id, cs.start_time, cs.end_time, c.timestamp,
                   c.author, c.log, c.filestatus, c.filename,
                   c.revision, c.state, c.mode
            FROM changeset cs
            INNER JOIN change c ON c.changeset_id = cs.id
            WHERE %s
            ORDER BY cs.end_time, cs.id""" % where

        changeset = None
        for row in self.dbh.execute(sql):
            change = Change(timestamp=row[3],
                            author=row[4],
                            log=row[5],
                            filestatus=row[6],
                            filename=row[7],
                            revision=row[8],
                            state=row[9],
                            mode=row[10])

            if changeset is None or changeset.id != row[0]:
                if changeset:
                    yield(changeset)

                changeset = ChangeSet(change, id=row[0])
                changeset.provider = self
                changeset.start_time = row[1]
                changeset.end_time = row[2]
            else:
                changeset.changes.append(change)

        if changeset:
            yield(changeset)
dataset/ETHPy150Open ustuehler/git-cvs/cvsgit/meta.py/MetaDb._select_changesets/swapped operands of `%`