From 7a91d51dcfc9516abc38aeaf5462ac55d454bb43 Mon Sep 17 00:00:00 2001 From: Mani Chandel Date: Thu, 24 Jul 2014 16:27:08 +0530 Subject: [PATCH] Enable transferring of attribute using command 'repo manifest -o -' 'upstream' attribute is now transferred to the new manifest xml that is created when using command 'repo manifest -o -'. Manifest help is updated for the attributes 'sync-c','sync-s' and 'sync-j'. Bug: Issue 164 Change-Id: If63f781e91d25c5b5b5ea0696b0c04337b0a686a --- docs/manifest-format.txt | 12 ++++++------ manifest_xml.py | 2 ++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/manifest-format.txt b/docs/manifest-format.txt index f187bfaf..28a21bb7 100644 --- a/docs/manifest-format.txt +++ b/docs/manifest-format.txt @@ -137,14 +137,14 @@ Project elements not setting their own `dest-branch` will inherit this value. If this value is not set, projects will use `revision` by default instead. -Attribute `sync_j`: Number of parallel jobs to use when synching. +Attribute `sync-j`: Number of parallel jobs to use when synching. -Attribute `sync_c`: Set to true to only sync the given Git +Attribute `sync-c`: Set to true to only sync the given Git branch (specified in the `revision` attribute) rather than the -whole ref space. Project elements lacking a sync_c element of +whole ref space. Project elements lacking a sync-c element of their own will use this value. -Attribute `sync_s`: Set to true to also sync sub-projects. +Attribute `sync-s`: Set to true to also sync sub-projects. Element manifest-server @@ -232,11 +232,11 @@ group "notdefault", it will not be automatically downloaded by repo. If the project has a parent element, the `name` and `path` here are the prefixed ones. -Attribute `sync_c`: Set to true to only sync the given Git +Attribute `sync-c`: Set to true to only sync the given Git branch (specified in the `revision` attribute) rather than the whole ref space. -Attribute `sync_s`: Set to true to also sync sub-projects. +Attribute `sync-s`: Set to true to also sync sub-projects. Attribute `upstream`: Name of the Git branch in which a sha1 can be found. Used when syncing a revision locked manifest in diff --git a/manifest_xml.py b/manifest_xml.py index fdc31778..3517c151 100644 --- a/manifest_xml.py +++ b/manifest_xml.py @@ -261,6 +261,8 @@ class XmlManifest(object): revision = self.remotes[remoteName].revision or d.revisionExpr if not revision or revision != p.revisionExpr: e.setAttribute('revision', p.revisionExpr) + if p.upstream and p.upstream != p.revisionExpr: + e.setAttribute('upstream', p.upstream) for c in p.copyfiles: ce = doc.createElement('copyfile')