'Destructively revert selected lines or hunk from a worktree file.'

def revert_selection(self):

    if self.has_selection():
        title = N_(u'Revert    Selected    Lines?')
        ok_text = N_(u'Revert    Selected    Lines')
    else:
        title = N_(u'Revert    Diff    Hunk?')
        ok_text = N_(u'Revert    Diff    Hunk')
    if (not qtutils.confirm(title, N_(u'This    operation    drops    uncommitted    changes.\nThese    changes    cannot    be    recovered.'), N_(u'Revert    the    uncommitted    changes?'), ok_text, default=True, icon=icons.undo())):
        return
    self.process_diff_selection(reverse=True, apply_to_worktree=True)
