Add three extra options for gbs export while generating tarball
authorZhang Qiang <qiang.z.zhang@intel.com>
Wed, 19 Sep 2012 05:19:57 +0000 (13:19 +0800)
committerZhang Qiang <qiang.z.zhang@intel.com>
Wed, 19 Sep 2012 13:43:39 +0000 (21:43 +0800)
* -upstream-branch: default is 'upstream'
* --upstream-tag: Upstream tag format, e.g. 'v${upstreamversion}'
* --squash-patches-until: When generating patches, squash patches
  up to given commit-ish into one monolithic diff file. Format is
  the commit-ish optionally followed by a colon and diff filename
  base.

Change-Id: I95c2baa19cf0ba65cb0c4d7cf995efe777933995

depanneur

index fe8e46c1bb25e8b6834ef26b1b19c5a87097e9f2..136620b83383cc3f90d97a280eb8293f32e51199 100755 (executable)
--- a/depanneur
+++ b/depanneur
@@ -66,6 +66,9 @@ my $binarylist = "";
 my $buildall = 0;
 my $commit = "";
 my $includeall = 0;
+my $upstream_branch = "";
+my $upstream_tag = "";
+my $squash_patches_until = "";
 my $dist = "tizen";
 my $dryrun = 0;
 my $help = 0;
@@ -122,6 +125,9 @@ GetOptions (
     "build-all" => \$buildall,
     "commit=s" => \$commit,
     "include-all" => \$includeall,
+    "upstream-branch=s" => \$upstream_branch,
+    "upstream-tag=s" => \$upstream_tag,
+    "squash-patches-until=s" => \$squash_patches_until,
     "binary=s" => \$binarylist,
     "style=s" => \$style,
     "path=s" => \$path,
@@ -447,6 +453,15 @@ sub prepare_git {
         } elsif ($commit ne "") {
             push @args, "--commit=$commit";
         }
+        if (! $upstream_branch eq "") {
+            push @args, "--upstream-branch=$upstream_branch";
+        }
+        if (! $upstream_tag eq "") {
+            push @args, "--upstream-tag=$upstream_tag";
+        }
+        if (! $squash_patches_until eq "") {
+            push @args, "--squash-patches-until=$squash_patches_until";
+        }
         $cmd = join(" ", @args);
         if ( my_system($cmd) == 0 ) {
             # Set cache_rev as 'include-all' if --include-all specified