Exemplo n.º 1
0
def cmd_pull(args):
    context = application_init(args, update=True)
    from cola.widgets import remote
    view = remote.pull()
    if args.rebase:
        view.set_rebase(True)
    return application_start(context, view)
Exemplo n.º 2
0
def cmd_pull(args):
    context = application_init(args, update=True)
    from cola.widgets import remote
    view = remote.pull()
    if args.rebase:
        view.set_rebase(True)
    return application_start(context, view)
Exemplo n.º 3
0
def main():
    """Start a git-cola-sequence-editor session"""
    args = parse_args()
    context = app.application_init(args)
    view = new_window(context, args.filename)
    app.application_run(context, view, start=view.start, stop=stop)
    return view.status
Exemplo n.º 4
0
def cmd_fetch(args):
    # TODO: the calls to update_status() can be done asynchronously
    # by hooking into the message_updated notification.
    context = application_init(args)
    from cola.widgets import remote
    context.model.update_status()
    view = remote.fetch()
    return application_start(context, view)
Exemplo n.º 5
0
def cmd_tag(args):
    context = application_init(args)
    from cola.widgets.createtag import new_create_tag
    view = new_create_tag(name=args.name,
                          ref=args.ref,
                          sign=args.sign,
                          settings=args.settings)
    return application_start(context, view)
Exemplo n.º 6
0
def cmd_fetch(args):
    # TODO: the calls to update_status() can be done asynchronously
    # by hooking into the message_updated notification.
    context = application_init(args)
    from cola.widgets import remote
    context.model.update_status()
    view = remote.fetch()
    return application_start(context, view)
Exemplo n.º 7
0
def cmd_archive(args):
    context = application_init(args, update=True)
    if args.ref is None:
        args.ref = context.model.currentbranch

    from cola.widgets.archive import GitArchiveDialog
    view = GitArchiveDialog(args.ref)
    return application_start(context, view)
Exemplo n.º 8
0
def cmd_archive(args):
    context = application_init(args, update=True)
    if args.ref is None:
        args.ref = context.model.currentbranch

    from cola.widgets.archive import GitArchiveDialog
    view = GitArchiveDialog(args.ref)
    return application_start(context, view)
Exemplo n.º 9
0
def cmd_cola(args):
    status_filter = args.status_filter
    if status_filter:
        status_filter = core.abspath(status_filter)

    context = application_init(args)
    from cola.widgets.main import MainView
    view = MainView(context.model, settings=args.settings)
    if args.amend:
        cmds.do(cmds.AmendMode, True)

    if status_filter:
        view.set_filter(core.relpath(status_filter))

    return application_start(context, view)
Exemplo n.º 10
0
def cmd_cola(args):
    status_filter = args.status_filter
    if status_filter:
        status_filter = core.abspath(status_filter)

    context = application_init(args)
    from cola.widgets.main import MainView
    view = MainView(context.model, settings=args.settings)
    if args.amend:
        cmds.do(cmds.AmendMode, True)

    if status_filter:
        view.set_filter(core.relpath(status_filter))

    return application_start(context, view)
Exemplo n.º 11
0
def cmd_grep(args):
    context = application_init(args)
    from cola.widgets import grep
    text = subprocess.list2cmdline(map(core.decode, args.args))
    view = grep.new_grep(text=text, parent=None)
    return application_start(context, view)
Exemplo n.º 12
0
def cmd_am(args):
    context = application_init(args)
    from cola.widgets.patch import new_apply_patches
    view = new_apply_patches(patches=args.patches)
    return application_start(context, view)
Exemplo n.º 13
0
def cmd_dag(args):
    """Run git-dag via the `git cola dag` sub-command"""
    context = app.application_init(args)
    view = git_dag(context, args=args, settings=args.settings, show=False)
    return app.application_start(context, view)
Exemplo n.º 14
0
def cmd_stash(args):
    context = application_init(args)
    from cola.widgets.stash import stash
    view = stash()
    return application_start(context, view)
Exemplo n.º 15
0
def cmd_find(args):
    context = application_init(args)
    from cola.widgets import finder
    paths = core.list2cmdline(args.paths)
    view = finder.finder(paths=paths)
    return application_start(context, view)
Exemplo n.º 16
0
def cmd_diff(args):
    context = application_init(args)
    from cola.difftool import diff_expression
    expr = core.list2cmdline(args.args)
    view = diff_expression(None, expr, create_widget=True)
    return application_start(context, view)
Exemplo n.º 17
0
def cmd_branch(args):
    context = application_init(args, update=True)
    from cola.widgets.createbranch import create_new_branch
    view = create_new_branch()
    return application_start(context, view)
Exemplo n.º 18
0
def cmd_branch(args):
    context = application_init(args, update=True)
    from cola.widgets.createbranch import create_new_branch
    view = create_new_branch(settings=args.settings)
    return application_start(context, view)
Exemplo n.º 19
0
def cmd_config(args):
    context = application_init(args)
    from cola.widgets.prefs import preferences
    view = preferences()
    return application_start(context, view)
Exemplo n.º 20
0
def cmd_find(args):
    context = application_init(args)
    from cola.widgets import finder
    paths = subprocess.list2cmdline(map(core.decode, args.paths))
    view = finder.finder(paths=paths)
    return application_start(context, view)
Exemplo n.º 21
0
def cmd_browse(args):
    context = application_init(args)
    from cola.widgets.browse import worktree_browser
    view = worktree_browser(update=False, settings=args.settings)
    return application_start(context, view)
Exemplo n.º 22
0
def cmd_diff(args):
    context = application_init(args)
    from cola.difftool import diff_expression
    expr = subprocess.list2cmdline(map(core.decode, args.args))
    view = diff_expression(None, expr, create_widget=True)
    return application_start(context, view)
Exemplo n.º 23
0
def cmd_dag(args):
    context = application_init(args)
    from cola.widgets.dag import git_dag
    view = git_dag(context.model, args=args, settings=args.settings)
    return application_start(context, view)
Exemplo n.º 24
0
def cmd_config(args):
    context = application_init(args)
    from cola.widgets.prefs import preferences
    view = preferences()
    return application_start(context, view)
Exemplo n.º 25
0
def cmd_browse(args):
    context = application_init(args)
    from cola.widgets.browse import worktree_browser
    view = worktree_browser(update=False, settings=args.settings)
    return application_start(context, view)
Exemplo n.º 26
0
def cmd_merge(args):
    context = application_init(args, update=True)
    from cola.widgets.merge import MergeView
    view = MergeView(context.cfg, context.model, parent=None)
    return application_start(context, view)
Exemplo n.º 27
0
def cmd_dag(args):
    context = application_init(args)
    from cola.widgets.dag import git_dag
    view = git_dag(context.model, args=args, settings=args.settings)
    return application_start(context, view)
Exemplo n.º 28
0
def cmd_find(args):
    context = application_init(args)
    from cola.widgets import finder
    paths = core.list2cmdline(args.paths)
    view = finder.finder(paths=paths)
    return application_start(context, view)
Exemplo n.º 29
0
def cmd_merge(args):
    context = application_init(args, update=True)
    from cola.widgets.merge import MergeView
    view = MergeView(context.cfg, context.model, parent=None)
    return application_start(context, view)
Exemplo n.º 30
0
def cmd_am(args):
    context = application_init(args)
    from cola.widgets.patch import new_apply_patches
    view = new_apply_patches(patches=args.patches)
    return application_start(context, view)
Exemplo n.º 31
0
def cmd_grep(args):
    context = application_init(args)
    from cola.widgets import grep
    text = core.list2cmdline(args.args)
    view = grep.new_grep(text=text, parent=None)
    return application_start(context, view)
Exemplo n.º 32
0
def cmd_push(args):
    context = application_init(args, update=True)
    from cola.widgets import remote
    view = remote.push()
    return application_start(context, view)
Exemplo n.º 33
0
def cmd_push(args):
    context = application_init(args, update=True)
    from cola.widgets import remote
    view = remote.push()
    return application_start(context, view)
Exemplo n.º 34
0
def cmd_remote(args):
    context = application_init(args)
    from cola.widgets import editremotes
    view = editremotes.new_remote_editor()
    return application_start(context, view)
Exemplo n.º 35
0
def cmd_remote(args):
    context = application_init(args)
    from cola.widgets import editremotes
    view = editremotes.new_remote_editor()
    return application_start(context, view)
Exemplo n.º 36
0
def cmd_stash(args):
    context = application_init(args)
    from cola.widgets.stash import stash
    view = stash()
    return application_start(context, view)
Exemplo n.º 37
0
def cmd_tag(args):
    context = application_init(args)
    from cola.widgets.createtag import new_create_tag
    view = new_create_tag(name=args.name, ref=args.ref, sign=args.sign,
                          settings=args.settings)
    return application_start(context, view)
Exemplo n.º 38
0
def cmd_dag(args):
    """Run git-dag via the `git cola dag` sub-command"""
    context = app.application_init(args)
    view = git_dag(context, args=args, settings=args.settings, show=False)
    return app.application_start(context, view)