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


Python GitHandler.get_refs方法代码示例

本文整理汇总了Python中git_handler.GitHandler.get_refs方法的典型用法代码示例。如果您正苦于以下问题:Python GitHandler.get_refs方法的具体用法?Python GitHandler.get_refs怎么用?Python GitHandler.get_refs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在git_handler.GitHandler的用法示例。


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

示例1: findoutgoing

# 需要导入模块: from git_handler import GitHandler [as 别名]
# 或者: from git_handler.GitHandler import get_refs [as 别名]
 def findoutgoing(self, remote, base=None, heads=None, force=False):
     if isinstance(remote, gitrepo):
         git = GitHandler(self, self.ui)
         base, heads = git.get_refs(remote.path)
         out, h = super(hgrepo, self).findoutgoing(remote, base, heads, force)
         return out
     else: #pragma: no cover
         return super(hgrepo, self).findoutgoing(remote, base, heads, force)
开发者ID:dgladkov,项目名称:hg-git,代码行数:10,代码来源:hgrepo.py

示例2: findcommonoutgoing

# 需要导入模块: from git_handler import GitHandler [as 别名]
# 或者: from git_handler.GitHandler import get_refs [as 别名]
def findcommonoutgoing(orig, repo, other, *args, **kwargs):
    if isinstance(other, gitrepo.gitrepo):
        git = GitHandler(repo, repo.ui)
        heads = git.get_refs(other.path)[0]
        kw = {}
        kw.update(kwargs)
        for val, k in zip(args,
                ('onlyheads', 'force', 'commoninc', 'portable')):
            kw[k] = val
        force = kw.get('force', False)
        commoninc = kw.get('commoninc', None)
        if commoninc is None:
            commoninc = discovery.findcommonincoming(repo, other,
                heads=heads, force=force)
            kw['commoninc'] = commoninc
        return orig(repo, other, **kw)
    return orig(repo, other, *args, **kwargs)
开发者ID:CSRedRat,项目名称:hg-git,代码行数:19,代码来源:__init__.py

示例3: findoutgoing

# 需要导入模块: from git_handler import GitHandler [as 别名]
# 或者: from git_handler.GitHandler import get_refs [as 别名]
 def findoutgoing(orig, local, remote, *args, **kwargs):
     kw = {}
     kw.update(kwargs)
     for val, k in zip(args, ('base', kwname, 'force')):
         kw[k] = val
     if isinstance(remote, gitrepo.gitrepo):
         # clean up this cruft when we're 1.7-only, remoteheads and
         # the return value change happened between 1.6 and 1.7.
         git = GitHandler(local, local.ui)
         base, heads = git.get_refs(remote.path)
         newkw = {'base': base, kwname: heads}
         newkw.update(kw)
         kw = newkw
         if kwname == 'heads':
             r = orig(local, remote, **kw)
             return [x[0] for x in r]
     return orig(local, remote, **kw)
开发者ID:dgladkov,项目名称:hg-git,代码行数:19,代码来源:__init__.py

示例4: findoutgoing

# 需要导入模块: from git_handler import GitHandler [as 别名]
# 或者: from git_handler.GitHandler import get_refs [as 别名]
 def findoutgoing(orig, local, remote, *args, **kwargs):
     if isinstance(remote, gitrepo.gitrepo):
         hgver = hg.util.version()
         if hgver >= "1.8.9" or (hgver > "1.8" and "+" in hgver):
             raise hgutil.Abort("hg-git outgoing support is broken on hg 1.9.x")
         # clean up this cruft when we're 1.7-only, remoteheads and
         # the return value change happened between 1.6 and 1.7.
         kw = {}
         kw.update(kwargs)
         for val, k in zip(args, ("base", kwname, "force")):
             kw[k] = val
         git = GitHandler(local, local.ui)
         base, heads = git.get_refs(remote.path)
         newkw = {"base": base, kwname: heads}
         newkw.update(kw)
         kw = newkw
         if kwname == "heads":
             r = orig(local, remote, **kw)
             return [x[0] for x in r]
         if kwname == "onlyheads":
             del kw["base"]
         return orig(local, remote, **kw)
     return orig(local, remote, *args, **kwargs)
开发者ID:hadisdc,项目名称:dotfiles,代码行数:25,代码来源:__init__.py

示例5: findoutgoing

# 需要导入模块: from git_handler import GitHandler [as 别名]
# 或者: from git_handler.GitHandler import get_refs [as 别名]
 def findoutgoing(orig, local, remote, *args, **kwargs):
     if isinstance(remote, gitrepo.gitrepo):
         hgver = hg.util.version()
         if hgver >= '1.8.9' or (hgver > '1.8' and '+' in hgver):
             raise hgutil.Abort(
                 'hg-git outgoing support is broken on hg 1.9.x')
         # clean up this cruft when we're 1.7-only, remoteheads and
         # the return value change happened between 1.6 and 1.7.
         kw = {}
         kw.update(kwargs)
         for val, k in zip(args, ('base', kwname, 'force')):
             kw[k] = val
         git = GitHandler(local, local.ui)
         base, heads = git.get_refs(remote.path)
         newkw = {'base': base, kwname: heads}
         newkw.update(kw)
         kw = newkw
         if kwname == 'heads':
             r = orig(local, remote, **kw)
             return [x[0] for x in r]
         if kwname == 'onlyheads':
             del kw['base']
         return orig(local, remote, **kw)
     return orig(local, remote, *args, **kwargs)
开发者ID:mcclure,项目名称:hg-git,代码行数:26,代码来源:__init__.py


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