diff options
Diffstat (limited to 'manifest_xml.py')
-rw-r--r-- | manifest_xml.py | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/manifest_xml.py b/manifest_xml.py index d20eac2a..ca65e33f 100644 --- a/manifest_xml.py +++ b/manifest_xml.py | |||
@@ -35,6 +35,7 @@ class _Default(object): | |||
35 | revisionExpr = None | 35 | revisionExpr = None |
36 | remote = None | 36 | remote = None |
37 | sync_j = 1 | 37 | sync_j = 1 |
38 | sync_c = False | ||
38 | 39 | ||
39 | class _XmlRemote(object): | 40 | class _XmlRemote(object): |
40 | def __init__(self, | 41 | def __init__(self, |
@@ -159,6 +160,9 @@ class XmlManifest(object): | |||
159 | if d.sync_j > 1: | 160 | if d.sync_j > 1: |
160 | have_default = True | 161 | have_default = True |
161 | e.setAttribute('sync-j', '%d' % d.sync_j) | 162 | e.setAttribute('sync-j', '%d' % d.sync_j) |
163 | if d.sync_c: | ||
164 | have_default = True | ||
165 | e.setAttribute('sync-c', 'true') | ||
162 | if have_default: | 166 | if have_default: |
163 | root.appendChild(e) | 167 | root.appendChild(e) |
164 | root.appendChild(doc.createTextNode('')) | 168 | root.appendChild(doc.createTextNode('')) |
@@ -212,6 +216,9 @@ class XmlManifest(object): | |||
212 | ae.setAttribute('value', a.value) | 216 | ae.setAttribute('value', a.value) |
213 | e.appendChild(ae) | 217 | e.appendChild(ae) |
214 | 218 | ||
219 | if p.sync_c: | ||
220 | e.setAttribute('sync-c', 'true') | ||
221 | |||
215 | if self._repo_hooks_project: | 222 | if self._repo_hooks_project: |
216 | root.appendChild(doc.createTextNode('')) | 223 | root.appendChild(doc.createTextNode('')) |
217 | e = doc.createElement('repo-hooks') | 224 | e = doc.createElement('repo-hooks') |
@@ -444,11 +451,18 @@ class XmlManifest(object): | |||
444 | d.revisionExpr = node.getAttribute('revision') | 451 | d.revisionExpr = node.getAttribute('revision') |
445 | if d.revisionExpr == '': | 452 | if d.revisionExpr == '': |
446 | d.revisionExpr = None | 453 | d.revisionExpr = None |
454 | |||
447 | sync_j = node.getAttribute('sync-j') | 455 | sync_j = node.getAttribute('sync-j') |
448 | if sync_j == '' or sync_j is None: | 456 | if sync_j == '' or sync_j is None: |
449 | d.sync_j = 1 | 457 | d.sync_j = 1 |
450 | else: | 458 | else: |
451 | d.sync_j = int(sync_j) | 459 | d.sync_j = int(sync_j) |
460 | |||
461 | sync_c = node.getAttribute('sync-c') | ||
462 | if not sync_c: | ||
463 | d.sync_c = False | ||
464 | else: | ||
465 | d.sync_c = sync_c.lower() in ("yes", "true", "1") | ||
452 | return d | 466 | return d |
453 | 467 | ||
454 | def _ParseNotice(self, node): | 468 | def _ParseNotice(self, node): |
@@ -526,6 +540,12 @@ class XmlManifest(object): | |||
526 | else: | 540 | else: |
527 | rebase = rebase.lower() in ("yes", "true", "1") | 541 | rebase = rebase.lower() in ("yes", "true", "1") |
528 | 542 | ||
543 | sync_c = node.getAttribute('sync-c') | ||
544 | if not sync_c: | ||
545 | sync_c = False | ||
546 | else: | ||
547 | sync_c = sync_c.lower() in ("yes", "true", "1") | ||
548 | |||
529 | groups = '' | 549 | groups = '' |
530 | if node.hasAttribute('groups'): | 550 | if node.hasAttribute('groups'): |
531 | groups = node.getAttribute('groups') | 551 | groups = node.getAttribute('groups') |
@@ -550,7 +570,8 @@ class XmlManifest(object): | |||
550 | revisionExpr = revisionExpr, | 570 | revisionExpr = revisionExpr, |
551 | revisionId = None, | 571 | revisionId = None, |
552 | rebase = rebase, | 572 | rebase = rebase, |
553 | groups = groups) | 573 | groups = groups, |
574 | sync_c = sync_c) | ||
554 | 575 | ||
555 | for n in node.childNodes: | 576 | for n in node.childNodes: |
556 | if n.nodeName == 'copyfile': | 577 | if n.nodeName == 'copyfile': |