clone: support '--packaging-branch' option.
authorwanchao-xu <wanchao.xu@samsung.com>
Fri, 26 Apr 2024 08:56:23 +0000 (16:56 +0800)
committerwanchao-xu <wanchao.xu@samsung.com>
Fri, 26 Apr 2024 08:56:52 +0000 (16:56 +0800)
Change-Id: Iecfbaaab7aa059add13822d47069d1a07b118b87
Signed-off-by: wanchao-xu <wanchao.xu@samsung.com>
docs/manpages/gbp-clone.xml
gbp/scripts/clone.py

index 042b3d219b217767e9a3392ef7995fc46db11076..df879c4570bcdbaf45b1c9573917bb63801d8ce6 100644 (file)
       &man.common.options.synopsis;
       <arg><option>--all</option></arg>
       <arg><option>--[no-]pristine-tar</option></arg>
-      <arg><option>--debian-branch=</option><replaceable>branch_name</replaceable></arg>
+      <group>
+        <arg><option>--debian-branch=</option><replaceable>branch_name</replaceable></arg>
+        <arg><option>--packaging-branch=</option><replaceable>branch_name</replaceable></arg>
+      </group>
       <arg><option>--upstream-branch=</option><replaceable>branch_name</replaceable></arg>
       <arg><option>--depth=</option><replaceable>depth</replaceable></arg>
       <arg><option>--reference=</option><replaceable>repository</replaceable></arg>
          developed on, default is <replaceable>master</replaceable>.</para>
         </listitem>
       </varlistentry>
+      <varlistentry>
+        <term><option>--packaging-branch</option>=<replaceable>branch_name</replaceable>
+        </term>
+        <listitem>
+          <para>The branch the packaging is being maintained on.
+          Alternative to the <emphasis>--debian-branch</emphasis> option.</para>
+        </listitem>
+      </varlistentry>
       <varlistentry>
         <term><option>--upstream-branch</option>=<replaceable>branch_name</replaceable>
         </term>
index 7e02f0e27e45ba2c7b563db616a9152040d2b292..9df98e07a784eb8c46fa8aa3f17a0d6197df0bea 100755 (executable)
@@ -139,7 +139,8 @@ def build_parser(name):
     branch_group.add_option("--all", action="store_true", dest="all", default=False,
                             help="track all branches, not only debian and upstream")
     branch_group.add_config_file_option(option_name="upstream-branch", dest="upstream_branch")
-    branch_group.add_config_file_option(option_name="debian-branch", dest="debian_branch")
+    branch_group.add_config_file_option(option_name="debian-branch", dest="packaging_branch")
+    branch_group.add_config_file_option(option_name="packaging-branch", dest="packaging_branch")
     branch_group.add_boolean_config_file_option(option_name="pristine-tar", dest="pristine_tar")
     branch_group.add_option("--depth", action="store", dest="depth", default=0,
                             help="git history depth (for creating shallow clones)")
@@ -221,7 +222,7 @@ def main(argv):
                         local != "HEAD"):
                     repo.create_branch(local, remote)
         else:  # only track gbp's default branches
-            branches = [options.debian_branch, options.upstream_branch]
+            branches = [options.packaging_branch, options.upstream_branch]
             if options.pristine_tar:
                 branches += [repo.pristine_tar_branch]
             gbp.log.debug('Will track branches: %s' % branches)
@@ -232,7 +233,7 @@ def main(argv):
                     repo.create_branch(branch, remote)
 
         if repo.has_branch(options.debian_branch, remote=True):
-            repo.set_branch(options.debian_branch)
+            repo.set_branch(options.packaging_branch)
 
         repo_setup.set_user_name_and_email(options.repo_user, options.repo_email, repo)
         if not options.defuse_gitattributes.is_off():