summaryrefslogtreecommitdiffstats
path: root/src/fedpkg.py
diff options
context:
space:
mode:
authorJochen Schmitt <Jochen@herr-schmitt.de>2010-09-16 20:05:48 +0200
committerJesse Keating <jkeating@redhat.com>2010-09-20 13:18:50 -0700
commit28e4985e215a8313841491c7d5794eb3c597ac8b (patch)
treee5e210a5c2e96d044e01b213586e917460f472fe /src/fedpkg.py
parentabd8e620a19b31a995a57f546988f794fa233b05 (diff)
downloadfedora-packager-28e4985e215a8313841491c7d5794eb3c597ac8b.zip
fedora-packager-28e4985e215a8313841491c7d5794eb3c597ac8b.tar.gz
fedora-packager-28e4985e215a8313841491c7d5794eb3c597ac8b.tar.xz
Add a -c (clog) switch to the commit command
Hello Jesse, this patch add a -c (clong) switch for the commit commant. Best Regards: Jochen Schmitt
Diffstat (limited to 'src/fedpkg.py')
-rwxr-xr-xsrc/fedpkg.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/fedpkg.py b/src/fedpkg.py
index 8fc21ad..405eb3f 100755
--- a/src/fedpkg.py
+++ b/src/fedpkg.py
@@ -440,6 +440,14 @@ def clone(args):
sys.exit(1)
def commit(args):
+ if args.clog:
+ try:
+ mymodule = pyfedpkg.PackageModule(args.path)
+ mymodule.clog()
+ except pyfedpkg.FedpkgError, e:
+ log.error('coult not create clog: %s' % e)
+ sys.exit(1)
+ args.file = os.path.abspath('clog')
try:
pyfedpkg.commit(args.path, args.message, args.file, args.files)
except pyfedpkg.FedpkgError, e:
@@ -909,6 +917,10 @@ packages will be built sequentially.
# commit stuff
parser_commit = subparsers.add_parser('commit',
help = 'Commit changes')
+ parser_commit.add_argument('-c', '--clog',
+ default = False,
+ action = 'store_true',
+ help = 'Generate the commit message from the %Changelog section')
parser_commit.add_argument('-m', '--message',
default = None,
help = 'Use the given <msg> as the commit message')