浏览代码

Merge "Always output upstream if specified"

Conley Owens 10 年之前
父节点
当前提交
6651a2d9b5
共有 1 个文件被更改,包括 7 次插入5 次删除
  1. 7 5
      manifest_xml.py

+ 7 - 5
manifest_xml.py

@@ -253,11 +253,13 @@ class XmlManifest(object):
         else:
           value = p.work_git.rev_parse(HEAD + '^0')
         e.setAttribute('revision', value)
-        if peg_rev_upstream and value != p.revisionExpr:
-          # Only save the origin if the origin is not a sha1, and the default
-          # isn't our value, and the if the default doesn't already have that
-          # covered.
-          e.setAttribute('upstream', p.revisionExpr)
+        if peg_rev_upstream:
+          if p.upstream:
+            e.setAttribute('upstream', p.upstream)
+          elif value != p.revisionExpr:
+            # Only save the origin if the origin is not a sha1, and the default
+            # isn't our value
+            e.setAttribute('upstream', p.revisionExpr)
       else:
         revision = self.remotes[remoteName].revision or d.revisionExpr
         if not revision or revision != p.revisionExpr: