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)
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
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)
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)
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)
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)
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)
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)
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)
def cmd_stash(args): context = application_init(args) from cola.widgets.stash import stash view = stash() return application_start(context, view)
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)
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)
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)
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)
def cmd_config(args): context = application_init(args) from cola.widgets.prefs import preferences view = preferences() return application_start(context, view)
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)
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)
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)
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)
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)
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)
def cmd_push(args): context = application_init(args, update=True) from cola.widgets import remote view = remote.push() return application_start(context, view)
def cmd_remote(args): context = application_init(args) from cola.widgets import editremotes view = editremotes.new_remote_editor() return application_start(context, view)