From: Brendan Cully Date: Sat, 3 Mar 2007 08:35:07 +0000 (-0800) Subject: Use hg-commit to perform commits that also update the ChangeLog. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4b9ecdf548942fe2876a5527263709447b4bf81e;p=neomutt Use hg-commit to perform commits that also update the ChangeLog. --- diff --git a/ChangeLog b/ChangeLog index 040fdb18f..c6d0726bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,33 @@ +2007-03-03 00:34 -0800 Brendan Cully (03596c38dd53) + + * hg-commit: Use hg-commit to perform commits that also update the + ChangeLog. + +2007-03-02 21:17 -0800 Brendan Cully (472e100053ed) + + * .hgignore: Ignore more built files + +2007-03-02 11:09 -0800 Brendan Cully (256c86830a36) + + * .hgignore: Create .hgignore file + +2007-03-02 10:29 +0100 Thomas Roessler (e040b8aba1c4) + + * configure.in: Make --enable-ssl without pop or imap a mere warning. + +2007-03-02 01:25 +0000 Petr Pisar (f1c800817281) + + * po/cs.po: Updated Czech translation (now in UTF-8). + +2007-03-01 06:05 +0000 Brendan Cully (d0ff524fa461) + + * init.h: Remove $file_charset SYN - it never appeared in an official + release. + +2007-02-28 17:48 +0000 Brendan Cully (083d6afe844c) + + * ChangeLog: # changelog commit + 2007-02-28 17:47:13 Brendan Cully (brendan) * imap/command.c, imap/imap.c, imap/imap_private.h: Add diff --git a/hg-changelog-map b/hg-changelog-map new file mode 100644 index 000000000..27bdc7a87 --- /dev/null +++ b/hg-changelog-map @@ -0,0 +1,5 @@ +header = '{date|isodate} {author|person} <{author|email}> ({node|short})\n\n' +changeset = '\t* {files|stringify|fill68|tabindent|strip}\n\n' +file = '{file}, ' +last_file = '{file}: {desc}\n\t' +no_files = '{desc}' diff --git a/hg-commit b/hg-commit new file mode 100755 index 000000000..be86a33e1 --- /dev/null +++ b/hg-commit @@ -0,0 +1,30 @@ +#!/bin/bash + +hg commit "$@" + +lrev=$(hg log --limit 1 --template '{rev}' ChangeLog) +trev=$(hg tip --template '{rev'}) +if [ $lrev = $trev ]; then exit 0; fi + +declare -a nopts + +while [ $# -gt 0 ] +do + case "$1" in + -m|-l) shift ;; + -*) nopts[${#nopts[*]}]="$1" ;; + # Include ChangeLog if given any explicit file names + *) nopts[${#nopts[*]}]="$1"; cl=ChangeLog ;; + esac + shift +done + +clog=$(hg tip --template '{desc}') + +{ + hg log --style=./hg-changelog-map -r tip:$lrev + hg cat ChangeLog +} > ChangeLog + +hg rollback +hg commit -m "$clog" "${nopts[@]}" $cl