Exemplo n.º 1
0
 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
Exemplo n.º 2
0
 def __init__(self, config, name, href):
     Repository.__init__(self, config, name)
     # allow user to adjust location of branch.
     self.href = config.repos.get(name, href)