Exemplo n.º 1
0
def create_new_branch(revision=''):
    """Launches a dialog for creating a new branch"""
    model = MainModel()
    model.update_status()

    model.revision = revision
    model.local_branch = ''

    view = createbranch.CreateBranchView(qtutils.active_window())
    ctl = CreateBranchController(model, view)
    model.set_revision(revision)
    view.show()
    return ctl
Exemplo n.º 2
0
def remote_action(action):
    """Launches fetch/push/pull dialogs."""
    # TODO: subclass model
    model = MainModel()

    global_model = cola.model()
    model.currentbranch = global_model.currentbranch
    model.local_branches = global_model.local_branches
    model.remote_branches = global_model.remote_branches
    model.tags = global_model.tags
    model.remotes = global_model.remotes

    model.local_branch = ''
    model.remote_branch = ''
    model.remotename = ''
    model.tags_checkbox = False
    model.rebase_checkbox = False
    model.ffwd_only_checkbox = True

    view = remote.RemoteView(qtutils.active_window(), action)
    ctl = RemoteController(model, view, action)
    view.show()
    return ctl