当前位置: 首页>>代码示例>>Python>>正文


Python archive.GitArchiveDialog类代码示例

本文整理汇总了Python中cola.widgets.archive.GitArchiveDialog的典型用法代码示例。如果您正苦于以下问题:Python GitArchiveDialog类的具体用法?Python GitArchiveDialog怎么用?Python GitArchiveDialog使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了GitArchiveDialog类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: create_tarball

def create_tarball(self):
    ref = self._clicked_item.commit.sha1
    dlg = GitArchiveDialog.create(ref, parent=self)
    if dlg is None:
        return
    self.emit(SIGNAL(archive), ref, dlg.fmt, dlg.prefix, dlg.filename)
    qtutils.information('File Saved', 'File saved to "%s"' % dlg.filename)
开发者ID:dcfrancisco,项目名称:git-cola,代码行数:7,代码来源:view.py

示例2: save_archive

 def save_archive(self):
     ref = git.rev_parse('HEAD')[STDOUT]
     shortref = ref[:7]
     GitArchiveDialog.save_hashed_objects(ref, shortref, self)
开发者ID:kewelinho,项目名称:git-cola,代码行数:4,代码来源:main.py

示例3: create_tarball

 def create_tarball(self):
     sha1 = self.selected_sha1()
     if sha1 is None:
         return
     short_sha1 = sha1[:7]
     GitArchiveDialog.save_hashed_objects(sha1, short_sha1, self)
开发者ID:B-Rich,项目名称:git-cola,代码行数:6,代码来源:dag.py

示例4: save_archive

 def save_archive(self):
     ref = git.rev_parse('HEAD')
     shortref = ref[:7]
     GitArchiveDialog.save(ref, shortref, self)
开发者ID:yjpark,项目名称:git-cola,代码行数:4,代码来源:view.py

示例5: main

def main(context):
    """Parses the command-line arguments and starts git-cola
    """
    setup_environment()
    opts, args, context = parse_args(context)
    repo = process_args(opts, args)

    # Allow Ctrl-C to exit
    signal.signal(signal.SIGINT, signal.SIG_DFL)

    # Initialize the app
    app = ColaApplication(sys.argv)

    # Ensure that we're working in a valid git repository.
    # If not, try to find one.  When found, chdir there.
    model = cola.model()
    valid = model.set_worktree(repo) and not opts.prompt
    while not valid:
        startup_dlg = startup.StartupDialog(app.activeWindow())
        gitdir = startup_dlg.find_git_repo()
        if not gitdir:
            sys.exit(-1)
        valid = model.set_worktree(gitdir)

    # Finally, go to the root of the git repo
    os.chdir(model.git.worktree())

    # Show the GUI
    if context == "archive":
        from cola.widgets.archive import GitArchiveDialog

        model.update_status()
        view = GitArchiveDialog(model.currentbranch)
    elif context == "branch":
        from cola.widgets.createbranch import create_new_branch

        view = create_new_branch()
    elif context in ("git-dag", "dag"):
        from cola.dag import git_dag

        ctl = git_dag(model, opts=opts, args=args)
        view = ctl.view
    elif context in ("classic", "browse"):
        from cola.classic import cola_classic

        view = cola_classic(update=False)
    elif context == "config":
        from cola.prefs import preferences

        ctl = preferences()
        view = ctl.view
    elif context == "fetch":
        # TODO: the calls to update_status() can be done asynchronously
        # by hooking into the message_updated notification.
        from cola.widgets import remote

        model.update_status()
        view = remote.fetch()
    elif context == "grep":
        from cola.widgets import grep

        view = grep.run_grep(parent=None)
    elif context == "pull":
        from cola.widgets import remote

        model.update_status()
        view = remote.pull()
    elif context == "push":
        from cola.widgets import remote

        model.update_status()
        view = remote.push()
    elif context == "remote":
        from cola.widgets import editremotes

        view = editremotes.edit()
    elif context == "search":
        from cola.widgets.search import search

        view = search()
    elif context == "stash":
        from cola.stash import stash

        model.update_status()
        view = stash().view
    elif context == "tag":
        from cola.widgets.createtag import create_tag

        view = create_tag()
    else:
        view = MainView(model, qtutils.active_window())
        ctl = MainController(model, view)

    # Install UI wrappers for command objects
    cfgactions.install_command_wrapper()
    guicmds.install_command_wrapper()

    # Make sure that we start out on top
    view.show()
    view.raise_()
#.........这里部分代码省略.........
开发者ID:adrlwill,项目名称:git-cola,代码行数:101,代码来源:app.py

示例6: save_archive

 def save_archive(self):
     ref = git.rev_parse("HEAD")[STDOUT]
     shortref = ref[:7]
     GitArchiveDialog.save(ref, shortref, self)
开发者ID:pwr,项目名称:git-cola,代码行数:4,代码来源:main.py


注:本文中的cola.widgets.archive.GitArchiveDialog类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。