本文整理汇总了Python中git_handler.GitHandler.push方法的典型用法代码示例。如果您正苦于以下问题:Python GitHandler.push方法的具体用法?Python GitHandler.push怎么用?Python GitHandler.push使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类git_handler.GitHandler
的用法示例。
在下文中一共展示了GitHandler.push方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: push
# 需要导入模块: from git_handler import GitHandler [as 别名]
# 或者: from git_handler.GitHandler import push [as 别名]
def push(self, remote, force=False, revs=None, newbranch=None):
if isinstance(remote, gitrepo):
git = GitHandler(self, self.ui)
git.push(remote.path, revs, force)
else: #pragma: no cover
# newbranch was added in 1.6
if newbranch is None:
return super(hgrepo, self).push(remote, force, revs)
else:
return super(hgrepo, self).push(remote, force, revs,
newbranch)
示例2: push
# 需要导入模块: from git_handler import GitHandler [as 别名]
# 或者: from git_handler.GitHandler import push [as 别名]
def push(self, remote, force=False, revs=None):
if isinstance(remote, gitrepo):
git = GitHandler(self, self.ui)
git.push(remote.path, revs, force)
else: #pragma: no cover
return super(hgrepo, self).push(remote, force, revs)
示例3: gpush
# 需要导入模块: from git_handler import GitHandler [as 别名]
# 或者: from git_handler.GitHandler import push [as 别名]
def gpush(ui, repo, remote_name='origin', branch=None):
git = GitHandler(repo, ui)
git.push(remote_name)