summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2012-01-12 15:40:42 +0200
committerGuido Günther <agx@sigxcpu.org>2012-02-13 18:54:16 +0100
commitbca9f76135c5b4975b261018f0c9013243f38846 (patch)
tree9047069f7ac0c33ae3e920412d2c489f28fe3e01 /examples
parent24e772577b071cb4297a5ed4b807aab334027144 (diff)
downloadgit-buildpackage-bca9f76135c5b4975b261018f0c9013243f38846.tar.gz
git-buildpackage-bca9f76135c5b4975b261018f0c9013243f38846.tar.bz2
git-buildpackage-bca9f76135c5b4975b261018f0c9013243f38846.zip
Refactor config.py as preparation for rpm support.
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 <agx@sigxcpu.org>
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/gbp-add-patch4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/gbp-add-patch b/examples/gbp-add-patch
index 5a974cde..6af6bc46 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'")