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


Python Repository.branch_from_xml方法代码示例

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


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

示例1: branch_from_xml

# 需要导入模块: from jhbuild.versioncontrol import Repository [as 别名]
# 或者: from jhbuild.versioncontrol.Repository import branch_from_xml [as 别名]
 def branch_from_xml(self, name, branchnode):
     branch = Repository.branch_from_xml(self, name, branchnode)
     # patches represented as children of the branch node
     for childnode in branchnode.childNodes:
         if (childnode.nodeType == childnode.ELEMENT_NODE and
             childnode.nodeName == 'patch'):
             patchfile = childnode.getAttribute('file')
             if childnode.hasAttribute('strip'):
                 patchstrip = int(childnode.getAttribute('strip'))
             else:
                 patchstrip = 0
             branch.patches.append((patchfile, patchstrip))
     return branch
开发者ID:inducer,项目名称:jhbuild,代码行数:15,代码来源:tarball.py

示例2: branch_from_xml

# 需要导入模块: from jhbuild.versioncontrol import Repository [as 别名]
# 或者: from jhbuild.versioncontrol.Repository import branch_from_xml [as 别名]
 def branch_from_xml(self, name, branchnode, repositories, default_repo):
     try:
         branch = Repository.branch_from_xml(self, name, branchnode, repositories, default_repo)
     except TypeError:
         raise FatalError(_('branch for %s is not correct, check the moduleset file.') % name)
     # patches represented as children of the branch node
     for childnode in branchnode.childNodes:
         if childnode.nodeType != childnode.ELEMENT_NODE: continue
         if childnode.nodeName == 'patch':
             patchfile = childnode.getAttribute('file')
             if childnode.hasAttribute('strip'):
                 patchstrip = int(childnode.getAttribute('strip'))
             else:
                 patchstrip = 0
             branch.patches.append((patchfile, patchstrip))
         elif childnode.nodeName == 'quilt':
             branch.quilt = get_branch(childnode, repositories, default_repo)
     return branch
开发者ID:mujin,项目名称:jhbuild,代码行数:20,代码来源:tarball.py


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