Support pristine-tar when generate tarball tz
authorLin Yang <lin.a.yang@intel.com>
Mon, 19 Nov 2012 06:30:00 +0000 (14:30 +0800)
committerLin Yang <lin.a.yang@intel.com>
Mon, 19 Nov 2012 07:46:26 +0000 (15:46 +0800)
Because gbs based on local upstream and pristine-tar branch, not
remote, to support pristine-tar. So checkout these two branches before
gbs export.

Change-Id: I1340497f6cc702be650fbea465f6a291342f5255
Signed-off-by: Lin Yang <lin.a.yang@intel.com>
job_submitobs.py

index cf78271..e1f1147 100755 (executable)
@@ -328,6 +328,12 @@ def main():
 
     msg = 'Submitter: %s <%s>\nComments: %s\nGit project: %s\nTag: %s\nCommit: %s %s' % (tagger['author'], tagger['email'], tagger['message'], GERRIT_PROJECT, tag, commitinfo['id'], commitinfo['subject'])
 
+    # to support pristine-tar, checkout upstream and pristine-tar branch to local
+    if mygit.has_branch('origin/upstream', remote=True):
+        mygit.checkout('upstream')
+    if mygit.has_branch('origin/pristine-tar', remote=True):
+        mygit.checkout('pristine-tar')
+    # checkout submit tag
     mygit.checkout(tag)
 
     for target in obstargets: