|
@@ -59,6 +59,7 @@ class _Default(object):
|
|
|
|
|
|
|
|
revisionExpr = None
|
|
revisionExpr = None
|
|
|
destBranchExpr = None
|
|
destBranchExpr = None
|
|
|
|
|
+ upstreamExpr = None
|
|
|
remote = None
|
|
remote = None
|
|
|
sync_j = 1
|
|
sync_j = 1
|
|
|
sync_c = False
|
|
sync_c = False
|
|
@@ -230,6 +231,9 @@ class XmlManifest(object):
|
|
|
if d.destBranchExpr:
|
|
if d.destBranchExpr:
|
|
|
have_default = True
|
|
have_default = True
|
|
|
e.setAttribute('dest-branch', d.destBranchExpr)
|
|
e.setAttribute('dest-branch', d.destBranchExpr)
|
|
|
|
|
+ if d.upstreamExpr:
|
|
|
|
|
+ have_default = True
|
|
|
|
|
+ e.setAttribute('upstream', d.upstreamExpr)
|
|
|
if d.sync_j > 1:
|
|
if d.sync_j > 1:
|
|
|
have_default = True
|
|
have_default = True
|
|
|
e.setAttribute('sync-j', '%d' % d.sync_j)
|
|
e.setAttribute('sync-j', '%d' % d.sync_j)
|
|
@@ -295,7 +299,8 @@ class XmlManifest(object):
|
|
|
revision = self.remotes[p.remote.orig_name].revision or d.revisionExpr
|
|
revision = self.remotes[p.remote.orig_name].revision or d.revisionExpr
|
|
|
if not revision or revision != p.revisionExpr:
|
|
if not revision or revision != p.revisionExpr:
|
|
|
e.setAttribute('revision', p.revisionExpr)
|
|
e.setAttribute('revision', p.revisionExpr)
|
|
|
- if p.upstream and p.upstream != p.revisionExpr:
|
|
|
|
|
|
|
+ if (p.upstream and (p.upstream != p.revisionExpr or
|
|
|
|
|
+ p.upstream != d.upstreamExpr)):
|
|
|
e.setAttribute('upstream', p.upstream)
|
|
e.setAttribute('upstream', p.upstream)
|
|
|
|
|
|
|
|
if p.dest_branch and p.dest_branch != d.destBranchExpr:
|
|
if p.dest_branch and p.dest_branch != d.destBranchExpr:
|
|
@@ -694,6 +699,7 @@ class XmlManifest(object):
|
|
|
d.revisionExpr = None
|
|
d.revisionExpr = None
|
|
|
|
|
|
|
|
d.destBranchExpr = node.getAttribute('dest-branch') or None
|
|
d.destBranchExpr = node.getAttribute('dest-branch') or None
|
|
|
|
|
+ d.upstreamExpr = node.getAttribute('upstream') or None
|
|
|
|
|
|
|
|
sync_j = node.getAttribute('sync-j')
|
|
sync_j = node.getAttribute('sync-j')
|
|
|
if sync_j == '' or sync_j is None:
|
|
if sync_j == '' or sync_j is None:
|
|
@@ -830,7 +836,7 @@ class XmlManifest(object):
|
|
|
|
|
|
|
|
dest_branch = node.getAttribute('dest-branch') or self._default.destBranchExpr
|
|
dest_branch = node.getAttribute('dest-branch') or self._default.destBranchExpr
|
|
|
|
|
|
|
|
- upstream = node.getAttribute('upstream')
|
|
|
|
|
|
|
+ upstream = node.getAttribute('upstream') or self._default.upstreamExpr
|
|
|
|
|
|
|
|
groups = ''
|
|
groups = ''
|
|
|
if node.hasAttribute('groups'):
|
|
if node.hasAttribute('groups'):
|