summaryrefslogtreecommitdiffstats
path: root/manifest_xml.py
diff options
context:
space:
mode:
Diffstat (limited to 'manifest_xml.py')
-rw-r--r--manifest_xml.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/manifest_xml.py b/manifest_xml.py
index edcbadae..b2918cac 100644
--- a/manifest_xml.py
+++ b/manifest_xml.py
@@ -284,7 +284,7 @@ https://gerrit.googlesource.com/git-repo/+/HEAD/docs/manifest-format.md
284 def _ParseGroups(self, groups): 284 def _ParseGroups(self, groups):
285 return [x for x in re.split(r'[,\s]+', groups) if x] 285 return [x for x in re.split(r'[,\s]+', groups) if x]
286 286
287 def Save(self, fd, peg_rev=False, peg_rev_upstream=True, groups=None): 287 def Save(self, fd, peg_rev=False, peg_rev_upstream=True, peg_rev_dest_branch=True, groups=None):
288 """Write the current manifest out to the given file descriptor. 288 """Write the current manifest out to the given file descriptor.
289 """ 289 """
290 mp = self.manifestProject 290 mp = self.manifestProject
@@ -389,6 +389,13 @@ https://gerrit.googlesource.com/git-repo/+/HEAD/docs/manifest-format.md
389 # Only save the origin if the origin is not a sha1, and the default 389 # Only save the origin if the origin is not a sha1, and the default
390 # isn't our value 390 # isn't our value
391 e.setAttribute('upstream', p.revisionExpr) 391 e.setAttribute('upstream', p.revisionExpr)
392
393 if peg_rev_dest_branch:
394 if p.dest_branch:
395 e.setAttribute('dest-branch', p.dest_branch)
396 elif value != p.revisionExpr:
397 e.setAttribute('dest-branch', p.revisionExpr)
398
392 else: 399 else:
393 revision = self.remotes[p.remote.orig_name].revision or d.revisionExpr 400 revision = self.remotes[p.remote.orig_name].revision or d.revisionExpr
394 if not revision or revision != p.revisionExpr: 401 if not revision or revision != p.revisionExpr: