msger.debug("Using upstream branch: %s" % upstream_branch)
msger.debug("Using upstream tag format: '%s'" % upstream_tag)
+ # Get patch squashing option
+ if opts.squash_patches_until:
+ squash_patches_until = opts.squash_patches_until
+ else:
+ squash_patches_until = configmgr.get('squash_patches_until', 'general')
+
+ # Now, start constructing the argument list
args = ["argv[0] placeholder", "--git-export-only",
"--git-ignore-new", "--git-builder=osc",
"--git-upstream-branch=upstream",
else:
args.extend(["--git-patch-export",
"--git-patch-export-compress=100k",
- "--git-force-create",])
+ "--git-force-create",
+ "--git-patch-export-squash-until=%s" %
+ squash_patches_until])
if repo.has_branch("pristine-tar"):
args.extend(["--git-pristine-tar"])
default=None,
dest='upstream_tag',
help="Upstream tag format, e.g. 'v%(upstreamversion)s'")
+ @cmdln.option('--squash-patches-until',
+ default=None,
+ dest='squash_patches_until',
+ help="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.")
def do_export(self, _subcmd, opts, *args):
"""${cmd_name}: export files and prepare for build
default=None,
dest='upstream_tag',
help="Upstream tag format, e.g. 'v%(upstreamversion)s'")
+ @cmdln.option('--squash-patches-until',
+ default=None,
+ dest='squash_patches_until',
+ help="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.")
def do_build(self, _subcmd, opts, *args):
"""${cmd_name}: local build package
default=None,
dest='upstream_tag',
help="Upstream tag format, e.g. 'v%(upstreamversion)s'")
+ @cmdln.option('--squash-patches-until',
+ default=None,
+ dest='squash_patches_until',
+ help="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.")
def do_remotebuild(self, subcmd, opts, *args):
"""${cmd_name}: remote build package