From bca9f76135c5b4975b261018f0c9013243f38846 Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Thu, 12 Jan 2012 15:40:42 +0200 Subject: Refactor config.py as preparation for rpm support. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Split GbpOptionParser in to a common base class and a Debian specific subclass, as a preparation for upcoming RPM support. This allows having different default values (and help texts) for common options between different package types, and, clearer separation of package type specific options. Signed-off-by: Guido Günther --- examples/gbp-add-patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/gbp-add-patch b/examples/gbp-add-patch index 5a974cd..6af6bc4 100755 --- a/examples/gbp-add-patch +++ b/examples/gbp-add-patch @@ -38,7 +38,7 @@ import os, os.path from gbp.command_wrappers import (Command, CommandExecFailed, GitCommand) -from gbp.config import (GbpOptionParser, GbpOptionGroup) +from gbp.config import (GbpOptionParserDebian, GbpOptionGroup) from gbp.errors import GbpError from gbp.git import (GitRepositoryError, GitRepository) from gbp.patch_series import Patch @@ -70,7 +70,7 @@ def build_commit_msg(repo, patch, options): def main(argv): retval = 0 - parser = GbpOptionParser(command=os.path.basename(argv[0]), prefix='', + parser = GbpOptionParserDebian(command=os.path.basename(argv[0]), prefix='', usage='%prog [options] - add a new patch') parser.add_config_file_option(option_name="meta-closes", dest="meta_closes", help="Meta tags for the bts close commands, default is '%(meta-closes)s'") -- cgit v1.2.3