summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2011-07-25 23:02:29 +0200
committerGuido Günther <agx@sigxcpu.org>2011-07-26 11:43:41 +0200
commit5bd3ff2361c68a3fdcd0b428a3e368cf05aae535 (patch)
tree8f5a4445c7005bfcb386c4753924b6800baa6861
parent51c87f2091afdab8a18fccdaa175f67b36a8684c (diff)
git-dch: add formatter that wraps the changelog entry
Closes: #626439
-rwxr-xr-xdebian/rules3
-rw-r--r--examples/wrap_cl.py14
2 files changed, 16 insertions, 1 deletions
diff --git a/debian/rules b/debian/rules
index b6145d48..46425636 100755
--- a/debian/rules
+++ b/debian/rules
@@ -20,7 +20,8 @@ EXAMPLE_SCRIPTS=\
gbp-add-patch \
gbp-cowbuilder-sid \
gbp-posttag-push \
- gbp-configure-unpatched-source
+ gbp-configure-unpatched-source \
+ wrap_cl.py
DEB_COMPRESS_EXCLUDE=$(EXAMPLE_SCRIPTS)
diff --git a/examples/wrap_cl.py b/examples/wrap_cl.py
new file mode 100644
index 00000000..5f1c0c85
--- /dev/null
+++ b/examples/wrap_cl.py
@@ -0,0 +1,14 @@
+# Simple changelog entry formatter
+#
+# It simply uses the built in formatter and linewraps the text
+#
+# Use git-dch --customizations=/usr/share/doc/git-buildpackage/examples/wrap_cl.py
+# or set it via gbp.conf
+
+import textwrap
+import gbp.dch
+
+def format_changelog_entry(commit_info, options, last_commit=False):
+ entry = gbp.dch.format_changelog_entry(commit_info, options, last_commit)
+ if entry:
+ return textwrap.wrap(" ".join(entry))