summaryrefslogtreecommitdiffstats
path: root/src
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
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')
-rw-r--r--src/fedpkg.bash2
-rwxr-xr-xsrc/fedpkg.py12
2 files changed, 13 insertions, 1 deletions
diff --git a/src/fedpkg.bash b/src/fedpkg.bash
index bb57b94..9ec0f02 100644
--- a/src/fedpkg.bash
+++ b/src/fedpkg.bash
@@ -108,7 +108,7 @@ _fedpkg()
after="package"
;;
commit|ci)
- options="--push -p"
+ options="--push -p --clog -c"
options_string="--message -m"
options_file="--file -F"
after="file"
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')