本文整理汇总了Python中easybuild.tools.repository.filerepo.FileRepository.add_easyconfig方法的典型用法代码示例。如果您正苦于以下问题:Python FileRepository.add_easyconfig方法的具体用法?Python FileRepository.add_easyconfig怎么用?Python FileRepository.add_easyconfig使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类easybuild.tools.repository.filerepo.FileRepository
的用法示例。
在下文中一共展示了FileRepository.add_easyconfig方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: add_easyconfig
# 需要导入模块: from easybuild.tools.repository.filerepo import FileRepository [as 别名]
# 或者: from easybuild.tools.repository.filerepo.FileRepository import add_easyconfig [as 别名]
def add_easyconfig(self, cfg, name, version, stats, append):
"""
Add easyconfig to mercurial repository.
"""
dest = FileRepository.add_easyconfig(self, cfg, name, version, stats, append)
# add it to version control
if dest:
try:
self.client.add(dest)
except (HgCommandError, HgServerError, HgResponseError, ValueError), err:
self.log.warning("adding %s to mercurial repository failed: %s" % (dest, err))
示例2: add_easyconfig
# 需要导入模块: from easybuild.tools.repository.filerepo import FileRepository [as 别名]
# 或者: from easybuild.tools.repository.filerepo.FileRepository import add_easyconfig [as 别名]
def add_easyconfig(self, cfg, name, version, stats, append):
"""
Add easyconfig to git repository.
"""
dest = FileRepository.add_easyconfig(self, cfg, name, version, stats, append)
# add it to version control
if dest:
try:
self.client.add(dest)
except GitCommandError, err:
self.log.warning("adding %s to git failed: %s" % (dest, err))
示例3: add_easyconfig
# 需要导入模块: from easybuild.tools.repository.filerepo import FileRepository [as 别名]
# 或者: from easybuild.tools.repository.filerepo.FileRepository import add_easyconfig [as 别名]
def add_easyconfig(self, cfg, name, version, stats, append):
"""
Add easyconfig to SVN repository.
"""
dest = FileRepository.add_easyconfig(self, cfg, name, version, stats, append)
self.log.debug("destination = %s" % dest)
if dest:
self.log.debug("destination status: %s" % self.client.status(dest))
if self.client and not self.client.status(dest)[0].is_versioned:
# add it to version control
self.log.debug("Going to add %s (working copy: %s, cwd %s)" % (dest, self.wc, os.getcwd()))
self.client.add(dest)