def clearstatus(repo):
    """Remove the status files"""
    tr = repo.currenttransaction()
    if tr:
        tr.removefilegenerator(b'rebasestate')
    repo.vfs.unlinkpath(b'rebasestate', ignoremissing=True)
