'Perform the actual fetch/push/pull operation'

def action_callback(self):

    action = self.action
    if (action == FETCH):
        model_action = self.model.fetch
    elif (action == PUSH):
        model_action = self.push_to_all
    else:
        model_action = self.model.pull
    remote_name = self.remote_name.text()
    if (not remote_name):
        errmsg = N_(u'No    repository    selected.')
        Interaction.log(errmsg)
        return
    (remote, kwargs) = self.common_args()
    self.selected_remotes = qtutils.selected_items(self.remotes, self.model.remotes)
    remote_branch = self.remote_branch.text()
    local_branch = self.local_branch.text()
    if ((action == PUSH) and (not remote_branch)):
        branch = local_branch
        candidate = (u'%s/%s' % (remote, branch))
        prompt = self.prompt_checkbox.isChecked()
        if (prompt and (candidate not in self.model.remote_branches)):
            title = N_(u'Push')
            args = dict(branch=branch, remote=remote)
            msg = (N_(u'Branch    "%(branch)s"    does    not    exist    in    "%(remote)s".\nA    new    remote    branch    will    be    published.') % args)
            info_txt = N_(u'Create    a    new    remote    branch?')
            ok_text = N_(u'Create    Remote    Branch')
            if (not qtutils.confirm(title, msg, info_txt, ok_text, icon=icons.cola())):
                return
    if self.force_checkbox.isChecked():
        if (action == FETCH):
            title = N_(u'Force    Fetch?')
            msg = N_(u'Non-fast-forward    fetch    overwrites    local    history!')
            info_txt = (N_(u'Force    fetching    from    %s?') % remote)
            ok_text = N_(u'Force    Fetch')
        elif (action == PUSH):
            title = N_(u'Force    Push?')
            msg = N_(u'Non-fast-forward    push    overwrites    published    history!\n(Did    you    pull    first?)')
            info_txt = (N_(u'Force    push    to    %s?') % remote)
            ok_text = N_(u'Force    Push')
        else:
            return
        if (not qtutils.confirm(title, msg, info_txt, ok_text, default=False, icon=icons.discard())):
            return
    self.buttons.setEnabled(False)
    task = ActionTask(self, model_action, remote, kwargs)
    self.runtask.start(task, progress=self.progress, finish=self.action_completed)
