'Update the remote branch name when a branch is selected'

def update_remote_branches(self):

    widget = self.remote_branches
    branches = self.filtered_remote_branches
    selection = qtutils.selected_item(widget, branches)
    if (not selection):
        return
    branch = utils.strip_one(selection)
    if (branch == u'HEAD'):
        return
    self.set_remote_branch(branch)
